diff --git a/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java b/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java index 2df3be6a..17790efa 100644 --- a/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java +++ b/common/src/main/java/com/jeesite/common/io/PropertiesUtils.java @@ -172,7 +172,7 @@ public class PropertiesUtils { private static final Pattern p1 = Pattern.compile("\\$\\{.*?\\}"); /** - * 获取属性值,取不到从System.getProperty()获取,都取不到返回null + * 获取属性值,取不到从System.getProperty和System.getenv获取,都取不到返回null */ public String getProperty(String key) { if (environment != null){ @@ -194,9 +194,10 @@ public class PropertiesUtils { String systemProperty = System.getProperty(key); if (systemProperty != null) { return systemProperty; + }else{ + return System.getenv(key); } } - return null; } /**