【发布时间】:2019-03-30 20:26:06
【问题描述】:
我有一个 application.properties,它指定要加载到应用程序中的属性文件的名称。
application.properties
sources=a_source,b_source,c_source
a_source、b_source 和 c_source 具有相同的变量。
a_source.properties
location = locationb
b_source.properties
location = locationb
c_source.properties
location=locationc
因此,如果我将属性文件的名称添加到 application.properties 中,例如 d_source,那么 d_source.properties 应该由应用程序自动加载。这样我的应用程序就可以处理来自 4 个属性文件的数据。这在 Spring Boot 中是否可行?
【问题讨论】:
-
为什么需要多个属性文件?
标签: java spring spring-boot properties properties-file