应用程序从外部化的credentials.properties
文件中读取主密码:
@PropertySources({
@PropertySource("file:${user.home}/.app/credentials.properties"),
@PropertySource(value = "classpath:application.properties")
})
应用程序属性application.properties
:
spring.profiles.active=@activatedProperties@
从活动配置文件的application-{PROFILE}.properties
文件加载.
如何覆盖位于file:${user.home}/.app/credentials.properties
中但仅针对特定配置文件(开发)的设置?
我会在IDE中更改设置值,而不是在文件系统中.