quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.

Home Page:https://quarkus.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Spring Properties: Support of `@ConstructorBinding` when using `@ConfigurationProperties`

Sgitario opened this issue · comments

Description

The annotation @ConstructorBinding is used to create immutable properties:

@ConstructorBinding
@ConfigurationProperties("my.service")
public class MyProperties {

    private final String name;

    public MyProperties(boolean name) {
        this.name = name;
    }

    public String getName() {
       return name;
    }

}

At the moment, all the classes annotation with @ConfigurationProperties must not contain constructors with arguments.

Implementation ideas

No response

Actually, we don't even include @ConstructorBinding in the jar we ship, so users can't add this anyway.

I'm going to close this as won't fix, because no one has ever complained about us not supporting the annotation.