Created
July 27, 2017 06:11
-
-
Save ansig/8102eaf3d2a72887a2668a2182cef1e3 to your computer and use it in GitHub Desktop.
Spring app annotation config to read properties from file on default path or from parameter
This file contains hidden or 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
@Configuration | |
@ComponentScan(basePackages = "sen.ansig.spring") | |
@PropertySource("classpath:config.properties") | |
@PropertySource(value = "file:${config.path:config.properties}", ignoreResourceNotFound = true) | |
public class MySpringAppWithProperties { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment