phe*_*mix 0 spring spring-mvc spring-4
我想读取properties文件密钥,我发现注释中有classpath要设置的属性@PropertySource:
@Configuration
@PropertySources({
@PropertySource("classpath:config.properties"),
@PropertySource("classpath:db.properties")
})
public class AppConfig {
//...
}
Run Code Online (Sandbox Code Playgroud)
属性文件应该放在哪里以及如何知道注释中的类路径?
| 归档时间: |
|
| 查看次数: |
12173 次 |
| 最近记录: |