From 2cfac32ec78760b638ac95724cdba96ab5388d4d Mon Sep 17 00:00:00 2001 From: gaojie Date: Fri, 21 Jun 2019 10:12:40 +0800 Subject: [PATCH] fix --- src/main/java/com/ljsd/listener/WebContextListener.java | 8 +++----- src/main/resources/application.properties | 6 +++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/main/java/com/ljsd/listener/WebContextListener.java b/src/main/java/com/ljsd/listener/WebContextListener.java index dbfbcf6..e7009b1 100644 --- a/src/main/java/com/ljsd/listener/WebContextListener.java +++ b/src/main/java/com/ljsd/listener/WebContextListener.java @@ -19,11 +19,9 @@ public class WebContextListener implements ServletContextListener { LOGGER.debug("dddddddddddddddddddddddddddddddd"); InputStream inputStream = null; try { - String osName = System.getProperty("os.name"); - if (!osName.matches("^(?i)Windows.*$")) {// Linux 系统 - DEFAULT_CONFIG_PATH = "../conf/application.properties"; - } - inputStream = getClass().getResourceAsStream(DEFAULT_CONFIG_PATH); + String path=System.getProperty("catalina.home"); + 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 00d0322..b42e791 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,6 +1,6 @@ #mogodb服务地址 -mongodb_url = mongodb://jieling:jieling666@127.0.0.1:27017/jieling_10048?&authSource=admin - +mongodb_url = mongodb://jieling:jieling666@60.1.1.14:27017/?&authSource=admin +mongodb_name = jl_core #与目标数据库可以建立的最大链接数 mongodb_maximumNumberOfConnections = 100 #与数据库建立链接的超时时间 2分钟 @@ -18,7 +18,7 @@ mongodb_socketTimeout = 0 #连接保持活跃 mongodb_socketKeepAlive = true -redis_host = 127.0.0.1 +redis_host = 60.1.1.14 redis_port = 6379 redis_password=jieling666 redis_maxTotal = 10