Closed
Description
Josh Long opened SPR-8539 and commented
Can we please register a PropertySourcesPlaceholderConfigurer when @PropertySource
is used so that everything just "works" in @Configuration
classes? I realize that I could also do a @Bean
public static PropertySourcesPlaceholderConfigurer pspc(){ }, but it is surprising that it doesn't work by default. It's one more place for users to stub their toes when I can't think of any reason not to support it. Thanks for your consideration.
Reference URL: http://blog.springsource.com/2011/06/10/spring-3-1-m2-configuration-enhancements/#comment-195857
Issue Links:
- Document default EmbeddedValueResolver support for property placeholders [SPR-17212] #21745 Document default EmbeddedValueResolver support for property placeholders
- @Enable-style annotation is desired for automatic registration of PropertySourcesPlaceholderConfigurer [SPR-9904] #14537
@Enable-style
annotation is desired for automatic registration of PropertySourcesPlaceholderConfigurer - Placeholder resolution for annotation attributes is not active by default [SPR-14140] #18712 Placeholder resolution for annotation attributes is not active by default
- @Component class using @Value cannot access @PropertySource proeprties [SPR-8516] #13161
@Component
class using@Value
cannot access@PropertySource
proeprties
Referenced from: commits 690d33e
1 votes, 9 watchers