To use PropertyPlaceholderConfigurer with the Configuration annoation, but without xml, use the @Import annotation.



@Configuration
public class DbConfigProperties {

@Bean
...