属性加载改进

This commit is contained in:
thinkgem
2020-06-03 19:08:19 +08:00
parent e26e4b726a
commit 61a0dd8eed

View File

@@ -33,8 +33,11 @@ public class PropertiesUtils {
// 默认加载的文件可通过继承覆盖若有相同Key优先加载后面的
public static final String[] DEFAULT_CONFIG_FILE = new String[]{
"classpath:config/bootstrap.yml", "classpath:bootstrap.yml",
"classpath:config/application.yml", "classpath:application.yml"};
"classpath:application.yml", "classpath:config/application.yml",
"classpath:bootstrap.yml", "classpath:config/bootstrap.yml",
"file:application.yml", "file:config/application.yml",
"file:bootstrap.yml", "file:config/bootstrap.yml",
};
private static Logger logger = PropertiesUtils.initLogger();
private final Set<String> configSet = SetUtils.newLinkedHashSet();