Spring expressions doesn't work inside the PropertySource annotation.
@PropertySource({ "classpath:application.properties",
"#{systemProperties['user.home']}/.app.properties" })
@Configuration
public class Config {
@Bean
public static PropertySourcesPlaceholderConfigurer propertySourcesPlaceholderConfigurer() {
PropertySourcesPlaceholderConfigurer result = new PropertySourcesPlaceholderConfigurer();
result.setOrder(0);
return result;
}
}