Closed
Description
Marcel Overdijk opened SPR-8516 and commented
I'm using a @Configuration
class like:
@Configuration
@ComponentScan(basePackages = {"nl.vooty"}, excludeFilters = {@Filter(type = FilterType.ANNOTATION, value = Configuration.class)})
@PropertySource("classpath:/META-INF/config.properties")
public class AppConfig {
..
}
In a @Component
class I would like to inject a property value using the @Value
annotation like:
@Component
public class AuthenticationFailureBadCredentialsListener implements ApplicationListener<AuthenticationFailureBadCredentialsEvent> {
@Value("${authentication.max.login.failures}")
private String maxLoginFailures;
..
}
Although the property exists, it's not injected in the variable.
When logging the value of the maxLoginFailures it is: "${authentication.max.login.failures}"
Note that I'm testing on M2.
Affects: 3.1 M2
Issue Links:
- automatic registration of PSPC when @PropertySource is used [SPR-8539] #13183 automatic registration of PSPC when
@PropertySource
is used