From dbe6820c9c7d18e186c774129fd7d5209e6602eb Mon Sep 17 00:00:00 2001 From: wentao Date: Sun, 14 Jan 2018 11:13:35 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update:=E4=BF=AE=E5=A4=8D=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84=E8=AF=BB=E5=8F=96=E6=B2=A1?= =?UTF-8?q?=E5=B8=A6=E7=9B=AE=E5=BD=95=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nutz/boot/config/impl/PropertiesConfigureLoader.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java b/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java index 7e9ebc04..e2fdfe5e 100644 --- a/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java +++ b/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java @@ -86,7 +86,7 @@ public class PropertiesConfigureLoader extends AbstractConfigureLoader { String configDir = getPath(conf.get("nutz.boot.configure.properties.dir")); for(String fileName: getFiles(configDir, "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); From 685121f419a3f95e4695f386d9d4a32d251ea9af Mon Sep 17 00:00:00 2001 From: wentao Date: Sun, 14 Jan 2018 12:38:33 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=8B=BC=E6=8E=A5?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E9=87=8D=E5=A4=8D=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/nutz/boot/config/impl/PropertiesConfigureLoader.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java b/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java index e2fdfe5e..b97ea5a5 100644 --- a/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java +++ b/nutzboot-core/src/main/java/org/nutz/boot/config/impl/PropertiesConfigureLoader.java @@ -83,8 +83,9 @@ 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(configDir, fileName)); if (tmp.exists() && tmp.canRead()) {