diff --git a/src/main/java/com/ljsd/listener/WebContextListener.java b/src/main/java/com/ljsd/listener/WebContextListener.java index e7009b1..50bfa98 100644 --- a/src/main/java/com/ljsd/listener/WebContextListener.java +++ b/src/main/java/com/ljsd/listener/WebContextListener.java @@ -20,7 +20,13 @@ public class WebContextListener implements ServletContextListener { InputStream inputStream = null; try { String path=System.getProperty("catalina.home"); - path += "/config/jl_loginserver/application.properties"; + String osName = System.getProperty("os.name"); + if (osName.matches("^(?i)Windows.*$")) {// Window 系统 + path = DEFAULT_CONFIG_PATH; + }else{ + path += "/config/jl_loginserver/application.properties"; + } + inputStream = getClass().getResourceAsStream(path); if (inputStream != null) { BaseGlobal.getInstance().properties.load(inputStream); diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index b42e791..6f6ac8a 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,5 +1,5 @@ #mogodb服务地址 -mongodb_url = mongodb://jieling:jieling666@60.1.1.14:27017/?&authSource=admin +mongodb_url = mongodb://60.1.1.14:27017/?&authSource=admin mongodb_name = jl_core #与目标数据库可以建立的最大链接数 mongodb_maximumNumberOfConnections = 100 @@ -20,7 +20,7 @@ mongodb_socketKeepAlive = true redis_host = 60.1.1.14 redis_port = 6379 -redis_password=jieling666 +redis_password= redis_maxTotal = 10 redis_minIdle = 3 redis_maxWaitMillis = 20