In SpringBoot we have @ConfigurationProperties
annotation which could be used to map env properties to Spring bean. Do we have similar construct in pure Spring application?
We have non SpringBoot application (WAR deployment), where we want to read properties in SpringBoot style.
We have tried in including
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
and use @EnableConfigurationProperties
but that is not working
@PropertySource("classpath:test.yaml")
@EnableConfigurationProperties(value = {TestProperties.class})
public static class Config {
}