Closed
Description
Andrey Rubtsov opened SPR-9904 and commented
This issue is a continuation of #13183. Long story short, Environment is advertised to be used in new Spring projects.
However, in those cases when using PSPC is still wanted instead of declaring it as a @Bean
it would be nice to have @Enable-style
annotation instead for it.
The main argument so far is probably that PSPC @Bean
looks slightly unnatural among app specific beans because it is related to Spring internals rather than carrying application bean semantics.
Issue Links:
- Placeholder resolution for annotation attributes is not active by default [SPR-14140] #18712 Placeholder resolution for annotation attributes is not active by default
- @Value("${someProperty}") should work without having to specify a PropertySourcesPlaceholderConfigurer bean. [SPR-11773] #16395
@Value
("${someProperty}") should work without having to specify a PropertySourcesPlaceholderConfigurer bean. - automatic registration of PSPC when @PropertySource is used [SPR-8539] #13183 automatic registration of PSPC when
@PropertySource
is used
16 votes, 26 watchers