Skip to content

Instantly share code, notes, and snippets.

@jmkgreen
Created September 24, 2014 13:47
Show Gist options
  • Save jmkgreen/7dd07d28486b5620c741 to your computer and use it in GitHub Desktop.
Save jmkgreen/7dd07d28486b5620c741 to your computer and use it in GitHub Desktop.
Configuration that fails to override
@Configuration
@PropertySources({
@PropertySource(value = {"classpath:myapp.properties", "classpath:hibernate.properties"}),
@PropertySource(value = {"file:${server.properties}"}, ignoreResourceNotFound = true)
})
public class ResourceConfig {
@Value("${hibernate.show_sql}")
private String properties;
@Bean
public static PropertySourcesPlaceholderConfigurer properties() {
return new PropertySourcesPlaceholderConfigurer();
}
public String getProperties() {
return properties;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment