调整属性文件加载顺序,classpath:application.yml 优先于 classpath:config/application.yml(升级注意)
This commit is contained in:
@@ -36,8 +36,8 @@ public class PropertiesUtils {
|
|||||||
|
|
||||||
// 默认加载的文件,可通过继承覆盖(若有相同Key,优先加载后面的)
|
// 默认加载的文件,可通过继承覆盖(若有相同Key,优先加载后面的)
|
||||||
public static final String[] DEFAULT_CONFIG_FILE = new String[]{
|
public static final String[] DEFAULT_CONFIG_FILE = new String[]{
|
||||||
"classpath:application.yml", "classpath:config/application.yml",
|
"classpath:config/application.yml", "classpath:application.yml",
|
||||||
"file:application.yml", "file:config/application.yml",
|
"file:config/application.yml", "file:application.yml",
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final Logger logger = PropertiesUtils.initLogger();
|
private static final Logger logger = PropertiesUtils.initLogger();
|
||||||
|
|||||||
Reference in New Issue
Block a user