I have a @ConfigurationProperties
class that is no longer binding to a YML property source that gets resolved via Spring Cloud Config after upgrading to Hoxton.SR7. This code works fine using Hoxton.SR4 with the latest Spring Boot 2.2.9.RELEASE. Now, my properties are not bound and I'm receiving NPEs when I try to reference them. Following is a snapshot of my code:
@Configuration
public class MyConfiguration {
@Bean
public MyPropertiesBean myPropertiesBean() {
return new MyPropertiesBean();
}
}
@ConfigurationProperties(prefix = "com.acme.properties")
@Validated
public class MyPropertiesBean {
...
}
In src/main/resources/META-INF/spring.factories
:
org.springframework.boot.autoconfigure.EnableAutoConfiguration=com.acme.MyConfiguration
Any ideas why my @ConfigurationProperties
class doesn't bind after upgrading Spring Cloud to Hoxton.SR7?