Skip to content

Support @ConfigurationProperties on bean method for application.properties references #1256

Open
@myatmin

Description

@myatmin

Expected Behavior

Should link up the reference to bean method's return type class

Current Behavior

Unknown properties

Context

As given configuration class as below

@Configuration
public class FooConfiguration {
  public static final String PREFIX = "foo.bar";
 @Bean
    @ConfigurationProperties(PREFIX)
    BarProperties barProperties() {
        return new BarProperties();
    }
}

public class BarProperties {
}

BarProperties type should be referenced on foo.bar properties in applicaiton.properties/application.yaml file, so that easier finding the correct type, same as @ConfigurationProperties annotation declaration on the class as below

@ConfigurationProperties(prefix = "foo.bar")
public class BarProperties {
}

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions