mirror of
https://gitee.com/nutz/nutzboot.git
synced 2024-12-03 12:18:50 +08:00
commit
cad79e97ce
@ -83,10 +83,11 @@ public class PropertiesConfigureLoader extends AbstractConfigureLoader {
|
||||
// 如果conf内含有nutz.boot.configure.properties.dir配置,则读取该目录下的所有配置文件
|
||||
// 配置示例: nutz.boot.configure.properties.dir=config, 那么读取的就是jar包当前目录下config子目录下的所有properties文件
|
||||
if(conf.has("nutz.boot.configure.properties.dir")) {
|
||||
String configDir = getPath(conf.get("nutz.boot.configure.properties.dir"));
|
||||
for(String fileName: getFiles(configDir, "properties")) {
|
||||
String configDir = conf.get("nutz.boot.configure.properties.dir");
|
||||
String configPath = getPath(configDir);
|
||||
for(String fileName: getFiles(configPath, "properties")) {
|
||||
try {
|
||||
File tmp = new File(getPath(fileName));
|
||||
File tmp = new File(getPath(configDir, fileName));
|
||||
if (tmp.exists() && tmp.canRead()) {
|
||||
try (FileInputStream ins = new FileInputStream(tmp)) {
|
||||
conf.load(Streams.utf8r(ins), false);
|
||||
|
Loading…
Reference in New Issue
Block a user