Created
February 6, 2012 14:19
-
-
Save eugenp/1752336 to your computer and use it in GitHub Desktop.
Properties with Spring - Register Property manually in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Bean | |
public static PropertyPlaceholderConfigurer properties(){ | |
PropertyPlaceholderConfigurer ppc = new PropertyPlaceholderConfigurer(); | |
Resource[] resources = new ClassPathResource[ ] | |
{ new ClassPathResource( "foo.properties" ) }; | |
ppc.setLocations( resources ); | |
ppc.setIgnoreUnresolvablePlaceholders( true ); | |
return ppc; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment