Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spring Properties: Support of @ConstructorBinding when using @ConfigurationProperties #19364

Closed
Sgitario opened this issue Aug 12, 2021 · 2 comments
Labels
area/spring Issues relating to the Spring integration kind/enhancement New feature or request triage/wontfix This will not be worked on

Comments

@Sgitario
Copy link
Contributor

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

@Sgitario Sgitario added the kind/enhancement New feature or request label Aug 12, 2021
@quarkus-bot
Copy link

quarkus-bot bot commented Aug 12, 2021

/cc @geoand

@quarkus-bot quarkus-bot bot added the area/spring Issues relating to the Spring integration label Aug 12, 2021
Sgitario added a commit to Sgitario/quarkus-test-suite that referenced this issue Aug 12, 2021
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint
with some different approaches to inject properties.

Current limitations:
- Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483
- The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
Sgitario added a commit to Sgitario/quarkus-test-suite that referenced this issue Aug 16, 2021
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint
with some different approaches to inject properties.

Current limitations:
- Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483
- The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
Sgitario added a commit to quarkus-qe/quarkus-test-suite that referenced this issue Aug 17, 2021
Exploratory testing for the `quarkus-spring-boot-properties` Quarkus extension. The application consists of a REST endpoint
with some different approaches to inject properties.

Current limitations:
- Relaxing name convention is not supported and it won't be supported: quarkusio/quarkus#12483
- The annotation `@ConstructorBinding` is not supported yet: quarkusio/quarkus#19364
@geoand
Copy link
Contributor

geoand commented Aug 23, 2021

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.

@geoand geoand closed this as completed Aug 23, 2021
@geoand geoand added the triage/wontfix This will not be worked on label Aug 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/spring Issues relating to the Spring integration kind/enhancement New feature or request triage/wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants