|
3
|
import java.nio.charset.Charset;
|
|
4
|
import java.util.HashMap;
|
|
5
|
import java.util.Map;
|
|
6
|
|
|
7
|
import org.slf4j.Logger;
|
|
8
|
import org.slf4j.LoggerFactory;
|
|
9
|
import org.springframework.beans.factory.annotation.Value;
|
|
10
|
import org.springframework.context.annotation.Configuration;
|
|
11
|
|
|
12
|
import com.alibaba.fastjson.JSON;
|
|
13
|
import com.alibaba.fastjson.JSONObject;
|
|
14
|
|
|
15
|
/**
|
|
16
|
* 北向接口统一入口
|
|
17
|
*
|
|
18
|
* @date 2010/09/24 23:42
|
|
19
|
*/
|
|
20
|
@Configuration
|
|
21
|
public class NorthboundInterfaceUtil {
|
|
22
|
|
|
23
|
private static final Logger logger = LoggerFactory.getLogger(NorthboundInterfaceUtil.class);
|
|
24
|
|
|
25
|
@Value("${aap.iot.userCode:IOT_ADMIN}")
|
|
26
|
private String userCode;
|
|
27
|
|
|
28
|
@Value("${aap.iot.passWord:123456}")
|
|
29
|
private String passWord;
|
|
30
|
|
|
31
|
@Value("${url.iot.login:http://47.105.130.83:8083/sso/login}")
|
|
32
|
private String iotLoginUrl;
|
|
33
|
|
|
34
|
@Value("${url.iot.service:http://47.105.130.83:8083/dmp/terminalNorthApi/}")
|
|
35
|
private String iotServiceUrl;
|
|
36
|
|
|
37
|
/**
|
|
38
|
* GET请求调用北向接口方法
|
|
39
|
*
|
|
40
|
* @param url
|
|
41
|
* @return
|
|
42
|
* @throws Exception
|
|
43
|
*/
|
|
44
|
public Map<String, Object> iotGetCallUtil(String url) throws Exception {
|
|
45
|
logger.debug("GET调用北向接口");
|
|
46
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
|
47
|
Map<String, String> signMap = new HashMap<String, String>();
|
|
48
|
|
|
49
|
// 1.在缓存中获取sessionId与sign
|
|
50
|
Object sign =CacheUtil.getCache("ebc_iot_north_sign");
|
|
51
|
Object session_id = CacheUtil.getCache("ebc_iot_north_session_id");
|
|
52
|
|
|
53
|
if (sign == null ) {
|
|
54
|
// 2.如果没有调用登录接口从新获取
|
|
55
|
signMap = iotLogin();
|
|
56
|
|
|
57
|
if (signMap == null) {
|
|
58
|
logger.debug("调用北向接口登录失败");
|
|
59
|
return resultMap;
|
|
60
|
}
|
|
61
|
|
|
62
|
} else {
|
|
63
|
signMap.put("ebc_iot_north_sign", String.valueOf(sign));
|
|
64
|
signMap.put("ebc_iot_north_session_id", String.valueOf(session_id));
|
|
65
|
|
|
66
|
}
|
|
67
|
|
|
68
|
// 3.调用北向服务接口
|
|
69
|
// (1)设置字符集
|
|
70
|
Charset charset = Charset.forName("utf-8");
|
|
71
|
try {
|
|
72
|
// (2)调用接口
|
|
73
|
String resultJson = HttpServiceUtil.sendGet(iotServiceUrl + url, charset, signMap);
|
|
74
|
// (3)将参数转为Map<String,String>【将返回值统一为String】
|
|
75
|
resultMap = JSON.parseObject(resultJson, Map.class);
|
|
76
|
} catch (Exception e) {
|
|
77
|
logger.error("调用北向接口失败: " + e.getMessage());
|
|
78
|
return new HashMap<String, Object>();
|
|
79
|
}
|
|
80
|
|
|
81
|
if (resultMap == null) {
|
|
82
|
logger.error("调用北向接口返回值为空");
|
|
83
|
return new HashMap<String, Object>();
|
|
84
|
|
|
85
|
} else if ("登录超时".equals(resultMap.get("resultMsg"))) {
|
|
86
|
// 4.登录超时,需重新登录
|
|
87
|
logger.info("调用北向接口失败,需重新登录");
|
|
88
|
// (1)清除缓存
|
|
89
|
CacheUtil.removeCache("ebc_iot_north_sign");
|
|
90
|
CacheUtil.removeCache("ebc_iot_north_session_id");
|
|
91
|
// (2)重新登录
|
|
92
|
signMap = iotLogin();
|
|
93
|
|
|
94
|
if (signMap == null) {
|
|
95
|
logger.debug("再次调用北向接口登录失败");
|
|
96
|
return resultMap;
|
|
97
|
}
|
|
98
|
|
|
99
|
try {
|
|
100
|
// (3)再次调用接口
|
|
101
|
String resultJson = HttpServiceUtil.sendGet(iotServiceUrl + url, charset, signMap);
|
|
102
|
// (4)获取返回值
|
|
103
|
resultMap = JSON.parseObject(resultJson, Map.class);
|
|
104
|
} catch (Exception e) {
|
|
105
|
logger.error("再次调用北向接口失败: " + e.getMessage());
|
|
106
|
return new HashMap<String, Object>();
|
|
107
|
}
|
|
108
|
|
|
109
|
if (resultMap == null) {
|
|
110
|
logger.error("再次调用北向接口返回值为空");
|
|
111
|
return new HashMap<String, Object>();
|
|
112
|
}
|
|
113
|
}
|
|
114
|
|
|
115
|
// 5.判断是否调用成功
|
|
116
|
if (NorthboundInterfaceConstant.resultCode_succeed.equals(resultMap.get("resultCode"))) {
|
|
117
|
logger.info("调用北向接口成功");
|
|
118
|
return resultMap;
|
|
119
|
} else {
|
|
120
|
logger.info("调用北向接口失败");
|
|
121
|
return new HashMap<String, Object>();
|
|
122
|
}
|
|
123
|
}
|
|
124
|
|
|
125
|
/**
|
|
126
|
* POST请求调用北向接口方法
|
|
127
|
*
|
|
128
|
* @param url
|
|
129
|
* @param paramsMap
|
|
130
|
* @return
|
|
131
|
* @throws Exception
|
|
132
|
*/
|
|
133
|
public Map<String, Object> iotPostCallUtil(String url, Map<String, Object> paramsMap) throws Exception {
|
|
134
|
logger.debug("POSt调用北向接口");
|
|
135
|
Map<String, Object> resultMap = new HashMap<String, Object>();
|
|
136
|
Map<String, String> signMap = new HashMap<String, String>();
|
|
137
|
|
|
138
|
// 1.在缓存中获取sessionId与sign
|
|
139
|
Object sign =CacheUtil.getCache("ebc_iot_north_sign");
|
|
140
|
Object session_id = CacheUtil.getCache("ebc_iot_north_session_id");
|
|
141
|
|
|
142
|
if (sign == null ) {
|
|
143
|
// 2.如果没有调用登录接口从新获取
|
|
144
|
signMap = iotLogin();
|
|
145
|
|
|
146
|
if (signMap == null) {
|
|
147
|
logger.debug("调用北向接口登录失败");
|
|
148
|
return resultMap;
|
|
149
|
}
|
|
150
|
|
|
151
|
} else {
|
|
152
|
signMap.put("ebc_iot_north_sign", String.valueOf(sign));
|
|
153
|
signMap.put("ebc_iot_north_session_id", String.valueOf(session_id));
|
|
154
|
|
|
155
|
}
|
|
156
|
|
|
157
|
// 3.调用北向服务接口
|
|
158
|
// (1)设置字符集
|
|
159
|
Charset charset = Charset.forName("utf-8");
|
|
160
|
try {
|
|
161
|
// (2)调用接口
|
|
162
|
String resultJson = HttpServiceUtil.sendPost(iotServiceUrl + url, paramsMap, charset, signMap);
|
|
163
|
// (3)将参数转为Map<String,String>【将返回值统一为String】
|
|
164
|
resultMap = JSON.parseObject(resultJson, Map.class);
|
|
165
|
} catch (Exception e) {
|
|
166
|
logger.error("调用北向接口失败: " + e.getMessage());
|
|
167
|
return new HashMap<String, Object>();
|
|
168
|
}
|
|
169
|
|
|
170
|
if (resultMap == null) {
|
|
171
|
logger.error("调用北向接口返回值为空");
|
|
172
|
return new HashMap<String, Object>();
|
|
173
|
} else if ("登录超时".equals(resultMap.get("resultMsg"))) {
|
|
174
|
// 4.登录超时,需重新登录
|
|
175
|
logger.info("调用北向接口登录超时,需重新登录");
|
|
176
|
// (1)清除缓存
|
|
177
|
CacheUtil.removeCache("ebc_iot_north_sign");
|
|
178
|
CacheUtil.removeCache("ebc_iot_north_session_id");
|
|
179
|
// (2)重新登录
|
|
180
|
signMap = iotLogin();
|
|
181
|
|
|
182
|
if (signMap == null) {
|
|
183
|
logger.debug("再次调用北向接口登录失败");
|
|
184
|
return resultMap;
|
|
185
|
}
|
|
186
|
|
|
187
|
try {
|
|
188
|
// (3)再次调用接口
|
|
189
|
String resultJson = HttpServiceUtil.sendPost(iotServiceUrl + url, paramsMap, charset, signMap);
|
|
190
|
// (4)获取返回值
|
|
191
|
resultMap = JSON.parseObject(resultJson, Map.class);
|
|
192
|
} catch (Exception e) {
|
|
193
|
logger.error("再次调用北向接口失败: " + e.getMessage());
|
|
194
|
return new HashMap<String, Object>();
|
|
195
|
}
|
|
196
|
|
|
197
|
if (resultMap == null) {
|
|
198
|
logger.error("再次调用北向接口返回值为空");
|
|
199
|
return new HashMap<String, Object>();
|
|
200
|
}
|
|
201
|
}
|
|
202
|
|
|
203
|
// 5.判断是否调用成功
|
|
204
|
if (NorthboundInterfaceConstant.resultCode_succeed.equals(resultMap.get("resultCode"))) {
|
|
205
|
logger.info("调用北向接口成功");
|
|
206
|
return resultMap;
|
|
207
|
} else {
|
|
208
|
logger.info("调用北向接口失败");
|
|
209
|
return new HashMap<String, Object>();
|
|
210
|
}
|
|
211
|
}
|
|
212
|
|
|
213
|
/**
|
|
214
|
* 调用登录接口获取sessionId与sign
|
|
215
|
*
|
|
216
|
* @return
|
|
217
|
*/
|
|
218
|
private Map<String, String> iotLogin() throws Exception {
|
|
219
|
logger.debug("登录北向接口");
|
|
220
|
HashMap<String, Object> loginParamMap = new HashMap<>();
|
|
221
|
|
|
222
|
// 调用登录接口获取sessionId与sign
|
|
223
|
loginParamMap.put("userCode", userCode);
|
|
224
|
loginParamMap.put("passWord", passWord);
|
|
225
|
|
|
226
|
// 设置字符集
|
|
227
|
Charset charset = Charset.forName("utf-8");
|
|
228
|
|
|
229
|
//Map<String, String> loginResultMap =new HashMap<String,String>();
|
|
230
|
JSONObject loginResultJsonObject = null;
|
|
231
|
try {
|
|
232
|
// 调用登录接口
|
|
233
|
String loginResult = HttpServiceUtil.sendPost(iotLoginUrl, loginParamMap, charset);
|
|
234
|
loginResultJsonObject = JSON.parseObject(loginResult);
|
|
235
|
} catch (Exception e) {
|
|
236
|
logger.error("登录北向接口失败: " + e.getMessage());
|
|
237
|
return null;
|
|
238
|
}
|
|
239
|
|
|
240
|
if (loginResultJsonObject != null && NorthboundInterfaceConstant.resultCode_succeed.equals(String.valueOf(loginResultJsonObject.get("resultCode")))) {
|
|
241
|
logger.info("登录北向接口成功");
|
|
242
|
|
|
243
|
Map<String, String> resultMap = (Map<String, String>) loginResultJsonObject.get("result");
|
|
244
|
// 将数据存到缓存中
|
|
245
|
CacheUtil.setCache("ebc_iot_north_sign", resultMap.get("sign"));
|
|
246
|
CacheUtil.setCache("ebc_iot_north_session_id", resultMap.get("session_id"));
|
|
247
|
return resultMap;
|
|
248
|
} else {
|
|
249
|
logger.info("登录北向接口失败");
|
|
250
|
return null;
|
|
251
|
}
|
|
252
|
}
|
|
253
|
}
|
|
@ -0,0 +1,48 @@
|
|
1
|
package com.ai.bss.location.rescue.util;
|
|
2
|
|
|
3
|
import org.slf4j.Logger;
|
|
4
|
import org.slf4j.LoggerFactory;
|
|
5
|
import org.springframework.beans.BeansException;
|
|
6
|
import org.springframework.context.ApplicationContext;
|
|
7
|
import org.springframework.context.ApplicationContextAware;
|
|
8
|
import org.springframework.stereotype.Component;
|
|
9
|
|
|
10
|
@Component
|
|
11
|
public class SpringUtil implements ApplicationContextAware {
|
|
12
|
private static final Logger logger = LoggerFactory.getLogger(SpringUtil.class);
|
|
13
|
private static ApplicationContext applicationContext;
|
|
14
|
|
|
15
|
private static void setApplicationcontext(ApplicationContext applicationContext) {
|
|
16
|
if(SpringUtil.applicationContext == null) {
|
|
17
|
SpringUtil.applicationContext = applicationContext;
|
|
18
|
}
|
|
19
|
}
|
|
20
|
|
|
21
|
@Override
|
|
22
|
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
|
|
23
|
setApplicationcontext(applicationContext);
|
|
24
|
logger.debug("---------------------------------------------------------------------");
|
|
25
|
logger.debug("========ApplicationContext配置成功,在普通类可以通过调用SpringUtils.getAppContext()获取applicationContext对象,applicationContext="+SpringUtil.applicationContext+"========");
|
|
26
|
logger.debug("---------------------------------------------------------------------");
|
|
27
|
}
|
|
28
|
|
|
29
|
//获取applicationContext
|
|
30
|
public static ApplicationContext getApplicationContext() {
|
|
31
|
return applicationContext;
|
|
32
|
}
|
|
33
|
|
|
34
|
//通过name获取 Bean.
|
|
35
|
public static Object getBean(String name){
|
|
36
|
return getApplicationContext().getBean(name);
|
|
37
|
}
|
|
38
|
|
|
39
|
//通过class获取Bean.
|
|
40
|
public static <T> T getBean(Class<T> clazz){
|
|
41
|
return getApplicationContext().getBean(clazz);
|
|
42
|
}
|
|
43
|
|
|
44
|
//通过name,以及Clazz返回指定的Bean
|
|
45
|
public static <T> T getBean(String name,Class<T> clazz){
|
|
46
|
return getApplicationContext().getBean(name, clazz);
|
|
47
|
}
|
|
48
|
}
|
|
@ -0,0 +1,15 @@
|
|
1
|
#gis\u767b\u5f55\u8d26\u53f7\u548c\u5bc6\u7801
|
|
2
|
aap.gis.userName=EBC_PPRS
|
|
3
|
aap.gis.passwd=ITBS93wMYHosT
|
|
4
|
|
|
5
|
#gis\u7684token\u5730\u5740
|
|
6
|
url.gis.token=http://192.168.74.189:9999/gisIntf/account/gettoken
|
|
7
|
|
|
8
|
#\u6d77\u56fe\u4e2d\u5fc3\u5750\u6807
|
|
9
|
seaMap.centre.longitude=123.396036
|
|
10
|
seaMap.centre.latitude=31.560302
|
|
11
|
|
|
12
|
#\u6d77\u56fe\u663e\u793a\u6bd4\u4f8b\u5c3a
|
|
13
|
# 5-->300km,6-->200km,7-->100km,8-->50km,9-->20km,10-->10km,11-->5km
|
|
14
|
# 12-->2km,13-->1km,14-->500m,15-->300m,16-->200m,17-->100m,18-->50m
|
|
15
|
seaMap.scale=8
|
|
@ -0,0 +1,14 @@
|
|
1
|
#\u5317\u5411\u767b\u5f55\u8d26\u53f7\u548c\u5bc6\u7801
|
|
2
|
aap.iot.userCode=IOT_ADMIN
|
|
3
|
aap.iot.passWord=123456
|
|
4
|
|
|
5
|
#iot\u7684\u5317\u5411\u63a5\u53e3\u6ce8\u518c\u5730\u5740
|
|
6
|
#url.iot.login=http://60.205.219.67:8300/sso/login
|
|
7
|
url.iot.login=http://47.105.130.83:8083/sso/login
|
|
8
|
|
|
9
|
#iot\u7684\u5317\u5411\u63a5\u53e3\u7edf\u4e00\u5730\u5740
|
|
10
|
#url.iot.service=http://60.205.219.67:8300/dmp/terminalNorthApi/
|
|
11
|
url.iot.service=http://47.105.130.83:8083/dmp/terminalNorthApi/
|
|
12
|
|
|
13
|
#\u7ec8\u7aef\u8d85\u65f6\u79bb\u7ebf\u65f6\u95f4(\u5206\u949f)
|
|
14
|
device.overtime.offline=20
|
|
@ -0,0 +1,54 @@
|
|
1
|
spring.application.name=WorkTaskSpec
|
|
2
|
server.port=8011
|
|
3
|
|
|
4
|
server.servlet.context-path=/ipu
|
|
5
|
|
|
6
|
# DATASOURCE (DataSourceAutoConfiguration & DataSourceProperties)
|
|
7
|
#spring.datasource.url=jdbc:mysql://localhost:3306/cmp
|
|
8
|
spring.datasource.url=jdbc:mysql://10.19.90.34:3307/energy?serverTimezone=Asia/Shanghai&characterEncoding=utf-8&verifyServerCertificate=false&useSSL=false&requireSSL=false
|
|
9
|
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
|
|
10
|
spring.datasource.username=ebc
|
|
11
|
spring.datasource.password=ebc@123
|
|
12
|
|
|
13
|
# JPA (JpaBaseConfiguration, HibernateJpaAutoConfiguration)
|
|
14
|
#spring.jpa.database=default
|
|
15
|
spring.jpa.database-platform=org.hibernate.dialect.MySQL5Dialect
|
|
16
|
spring.jpa.hibernate.ddl-auto=none
|
|
17
|
spring.jpa.show-sql=true
|
|
18
|
spring.jpa.properties.hibernate.format_sql=true
|
|
19
|
spring.jpa.properties.hibernate.generate_statistics=false
|
|
20
|
spring.main.allow-bean-definition-overriding=true
|
|
21
|
|
|
22
|
#kafka
|
|
23
|
kafka.bootstrap-servers=47.105.160.21:9090
|
|
24
|
#kafka.bootstrap-servers=10.19.90.34:2182
|
|
25
|
#kafka.topic.deviceLocation=Topic_IoT_DeviceLocation
|
|
26
|
#kafka.topic.alarm=Topic_IoT_IndividualAlarm
|
|
27
|
kafka.topic.deviceLocation=DeviceLocationA
|
|
28
|
kafka.topic.alarm=IndividualAlarmA
|
|
29
|
kafka.producer.batch-size=16785
|
|
30
|
kafka.producer.retries=1
|
|
31
|
kafka.producer.buffer-memory=33554432
|
|
32
|
kafka.producer.linger=1
|
|
33
|
kafka.consumer.auto-offset-reset=latest
|
|
34
|
kafka.consumer.max-poll-records=3100
|
|
35
|
kafka.consumer.enable-auto-commit=false
|
|
36
|
kafka.consumer.auto-commit-interval=1000
|
|
37
|
kafka.consumer.session-timeout=20000
|
|
38
|
kafka.consumer.max-poll-interval=15000
|
|
39
|
kafka.consumer.max-partition-fetch-bytes=15728640
|
|
40
|
kafka.listener.batch-listener=false
|
|
41
|
kafka.listener.concurrencys=3,6
|
|
42
|
kafka.listener.poll-timeout=1500
|
|
43
|
|
|
44
|
|
|
45
|
# CACHE
|
|
46
|
#spring.cache.type=ehcache
|
|
47
|
#spring.cache.ehcache.config=ehcache.xml
|
|
48
|
|
|
49
|
# LOGGING
|
|
50
|
logging.level.com.ai=debug
|
|
51
|
logging.level.org.springframework.data=debug
|
|
52
|
|
|
53
|
# \u5f15\u5165gis\u548ciot\u7684\u914d\u7f6e\u6587\u4ef6
|
|
54
|
spring.profiles.active=iot,gis
|
|
@ -0,0 +1,114 @@
|
|
1
|
<?xml version = '1.0' encoding = 'UTF-8'?>
|
|
2
|
<caches>
|
|
3
|
<cache name="ssn" type="redis">
|
|
4
|
<servers>
|
|
5
|
<!-- 如果不是cluster,则只使用第一个redis -->
|
|
6
|
<server ip="121.42.183.206" port="7101" />
|
|
7
|
<server ip="121.42.183.206" port="7102" />
|
|
8
|
<server ip="121.42.183.206" port="7103" />
|
|
9
|
<server ip="121.42.183.206" port="7104" />
|
|
10
|
<server ip="121.42.183.206" port="7105" />
|
|
11
|
<server ip="121.42.183.206" port="7106" />
|
|
12
|
</servers>
|
|
13
|
<!-- 客户端类型:Jedis,JedisCluster -->
|
|
14
|
<config name="clientType" value="JedisCluster"/>
|
|
15
|
<!-- 访问redis的密码,可以为空 -->
|
|
16
|
<config name="auth" value="Ipu@321!"/>
|
|
17
|
<!-- redis池的可用连接实例的最大数目,缺省为8 -->
|
|
18
|
<config name="poolSize" value="10"/>
|
|
19
|
<!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
|
|
20
|
<config name="maxIdle"/>
|
|
21
|
<!-- 最小空闲数,空闲连接小于这个数会建立新的连接,缺省为0 -->
|
|
22
|
<config name="minIdle"/>
|
|
23
|
<!-- 等待Response超时时间,默认2000ms -->
|
|
24
|
<config name="soTimeout"/>
|
|
25
|
<!-- 连接Redis Server超时时间,默认2000ms -->
|
|
26
|
<config name="connTimeout"/>
|
|
27
|
<!-- 出现异常最大重试次数 -->
|
|
28
|
<config name="maxAttempts"/>
|
|
29
|
</cache>
|
|
30
|
|
|
31
|
<cache name="SSN_CACHE" type="redis">
|
|
32
|
<servers>
|
|
33
|
<!-- 如果不是cluster,则只使用第一个redis -->
|
|
34
|
<server ip="121.42.183.206" port="7101" />
|
|
35
|
<server ip="121.42.183.206" port="7102" />
|
|
36
|
<server ip="121.42.183.206" port="7103" />
|
|
37
|
<server ip="121.42.183.206" port="7104" />
|
|
38
|
<server ip="121.42.183.206" port="7105" />
|
|
39
|
<server ip="121.42.183.206" port="7106" />
|
|
40
|
</servers>
|
|
41
|
<!-- 客户端类型:Jedis,JedisCluster -->
|
|
42
|
<config name="clientType" value="JedisCluster"/>
|
|
43
|
<!-- 访问redis的密码,可以为空 -->
|
|
44
|
<config name="auth" value="Ipu@321!"/>
|
|
45
|
<!-- redis池的可用连接实例的最大数目,缺省为8 -->
|
|
46
|
<config name="poolSize" value="10"/>
|
|
47
|
<!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
|
|
48
|
<config name="maxIdle"/>
|
|
49
|
<!-- 最小空闲数,空闲连接小于这个数会建立新的连接,缺省为0 -->
|
|
50
|
<config name="minIdle"/>
|
|
51
|
<!-- 等待Response超时时间,默认2000ms -->
|
|
52
|
<config name="soTimeout"/>
|
|
53
|
<!-- 连接Redis Server超时时间,默认2000ms -->
|
|
54
|
<config name="connTimeout"/>
|
|
55
|
<!-- 出现异常最大重试次数 -->
|
|
56
|
<config name="maxAttempts"/>
|
|
57
|
</cache>
|
|
58
|
|
|
59
|
<cache name="client_route" type="redis">
|
|
60
|
<servers>
|
|
61
|
<!-- 如果不是cluster,则只使用第一个redis -->
|
|
62
|
<server ip="121.42.183.206" port="7101" />
|
|
63
|
<server ip="121.42.183.206" port="7102" />
|
|
64
|
<server ip="121.42.183.206" port="7103" />
|
|
65
|
<server ip="121.42.183.206" port="7104" />
|
|
66
|
<server ip="121.42.183.206" port="7105" />
|
|
67
|
<server ip="121.42.183.206" port="7106" />
|
|
68
|
</servers>
|
|
69
|
<!-- 客户端类型:Jedis,JedisCluster -->
|
|
70
|
<config name="clientType" value="JedisCluster"/>
|
|
71
|
<!-- 访问redis的密码,可以为空 -->
|
|
72
|
<config name="auth" value="Ipu@321!"/>
|
|
73
|
<!-- redis池的可用连接实例的最大数目,缺省为8 -->
|
|
74
|
<config name="poolSize" value="10"/>
|
|
75
|
<!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
|
|
76
|
<config name="maxIdle"/>
|
|
77
|
<!-- 最小空闲数,空闲连接小于这个数会建立新的连接,缺省为0 -->
|
|
78
|
<config name="minIdle"/>
|
|
79
|
<!-- 等待Response超时时间,默认2000ms -->
|
|
80
|
<config name="soTimeout"/>
|
|
81
|
<!-- 连接Redis Server超时时间,默认2000ms -->
|
|
82
|
<config name="connTimeout"/>
|
|
83
|
<!-- 出现异常最大重试次数 -->
|
|
84
|
<config name="maxAttempts"/>
|
|
85
|
</cache>
|
|
86
|
|
|
87
|
<cache name="pushServer_route" type="redis">
|
|
88
|
<servers>
|
|
89
|
<!-- 如果不是cluster,则只使用第一个redis -->
|
|
90
|
<server ip="121.42.183.206" port="7101" />
|
|
91
|
<server ip="121.42.183.206" port="7102" />
|
|
92
|
<server ip="121.42.183.206" port="7103" />
|
|
93
|
<server ip="121.42.183.206" port="7104" />
|
|
94
|
<server ip="121.42.183.206" port="7105" />
|
|
95
|
<server ip="121.42.183.206" port="7106" />
|
|
96
|
</servers>
|
|
97
|
<!-- 客户端类型:Jedis,JedisCluster -->
|
|
98
|
<config name="clientType" value="JedisCluster"/>
|
|
99
|
<!-- 访问redis的密码,可以为空 -->
|
|
100
|
<config name="auth" value="Ipu@321!"/>
|
|
101
|
<!-- redis池的可用连接实例的最大数目,缺省为8 -->
|
|
102
|
<config name="poolSize" value="10"/>
|
|
103
|
<!-- redis池最多有多少个状态为idle(空闲的)的jedis实例,缺省为8,空闲连接大于这个数会进行回收 -->
|
|
104
|
<config name="maxIdle"/>
|
|
105
|
<!-- 最小空闲数,空闲连接小于这个数会建立新的连接,缺省为0 -->
|
|
106
|
<config name="minIdle"/>
|
|
107
|
<!-- 等待Response超时时间,默认2000ms -->
|
|
108
|
<config name="soTimeout"/>
|
|
109
|
<!-- 连接Redis Server超时时间,默认2000ms -->
|
|
110
|
<config name="connTimeout"/>
|
|
111
|
<!-- 出现异常最大重试次数 -->
|
|
112
|
<config name="maxAttempts"/>
|
|
113
|
</cache>
|
|
114
|
</caches>
|
|
@ -0,0 +1,77 @@
|
|
1
|
#\u7CFB\u7EDF\u57DF
|
|
2
|
SYSTEM_DOMAIN=LOGIN_CACHE_ROUTE
|
|
3
|
|
|
4
|
#------------------------------cookie\u914D\u7F6E-------------#
|
|
5
|
##COOKIE\u7684\u6709\u6548\u57DF,\u4E0D\u8BBE\u7F6E\uFF0C\u5219\u81EA\u52A8\u8BBE\u7F6E
|
|
6
|
#COOKIE_DOMAIN=crm.chinapost.yw.com
|
|
7
|
|
|
8
|
COOKIE_PATH=/
|
|
9
|
|
|
10
|
##Session \u8D85\u65F6\u65F6\u95F4(\u79D2)
|
|
11
|
SESSION_TIMEOUT=3600
|
|
12
|
COOKIE_MAXAGE=-1
|
|
13
|
|
|
14
|
|
|
15
|
TENANT_REGISTER_CLASS=com.ai.customermanager.services.impl.CustRegisterVercodeImpl
|
|
16
|
|
|
17
|
|
|
18
|
##\u8FDC\u7A0B\u7F13\u5B58\u8C03\u7528\u7C7B\uFF0C\u8FD9\u4E2A\u7C7B\u5FC5\u987B\u6709\u4E09\u4E2A\u51FD\u6570
|
|
19
|
## public boolean set(String key,String value)
|
|
20
|
## public String get(String key)
|
|
21
|
## public boolean del(String key);
|
|
22
|
COOKIE_CACHE_CLASS=com.ai.sso.util.SessionRedisCache
|
|
23
|
|
|
24
|
LOGGING_INTERFACE_CLASS=com.wframe.baseinfo.util.BaseInfoUtil
|
|
25
|
|
|
26
|
##COOKIE_IS_CACHE \u662F\u5426\u7F13\u5B58\u5230\u8FDC\u7AEF\u3002
|
|
27
|
COOKIE_IS_CACHE=1
|
|
28
|
|
|
29
|
|
|
30
|
##IS_CHECK_LOGIN \u662F\u5426\u68C0\u67E5\u767B\u9646\u3002
|
|
31
|
IS_CHECK_LOGIN=1
|
|
32
|
|
|
33
|
|
|
34
|
LOGIN_SERVICE=uspa_IOrgmodelClientCSV_loginIn
|
|
35
|
LOGINNOPASS_SERVICE=uspa_IOrgmodelClientCSV_loginWithNoPassword
|
|
36
|
|
|
37
|
|
|
38
|
Access-Control-Allow-origin=http://crm.chinapost.yw.com:18080/
|
|
39
|
|
|
40
|
##\u68C0\u67E5SesisonId,sign \u662F\u5426\u6B63\u786E
|
|
41
|
SESSION_CHECK_SIGN=com.ai.sso.util.SessionCheckSign
|
|
42
|
SESSION_CHECK_LOGIN=com.ai.sso.util.SessionCheckLogin
|
|
43
|
#redis
|
|
44
|
|
|
45
|
##MAIN_PAGE
|
|
46
|
#MAIN_PAGE=http://crm.chinapost.com:18880/
|
|
47
|
##RETURN TAG \u8FD4\u56DE\u5B57\u7B26\u4E32
|
|
48
|
|
|
49
|
RETURN_TAG={"MESSAGE":"NOLOGIN","CODE":999999,"FLAG":"FAIL","RESULT":{"URL":"http://crm.chinapost.yw.com:18080/"}}
|
|
50
|
#RETURN_TAG=<html><script language="javascript"> function init(){ if(window.parent!=null) { window.parent.location.href ="http://crm.chinapost.com:18880"; } else window.location.href ="http://crm.chinapost.com:18880"; } </script><body onload="init()"></body></html>
|
|
51
|
|
|
52
|
|
|
53
|
|
|
54
|
redis.single=10.11.20.117:6379
|
|
55
|
redis.pool.maxTotal=1000
|
|
56
|
redis.pool.minIdle=5
|
|
57
|
redis.pool.maxIdle=100
|
|
58
|
redis.pool.testOnBorrow=false
|
|
59
|
redis.pool.maxWait=5000
|
|
60
|
redis.pool.testOnReturn=true
|
|
61
|
redis.pool.testWhileIdle=true
|
|
62
|
redis.pool.timeBetweenEvictionRunsMillis=10000
|
|
63
|
redis.password=luMZulgbotmo71aa
|
|
64
|
|
|
65
|
SESSION_DEFAULT_VERCODE=Hiz#8uAqkjhoPmXu8%aaa
|
|
66
|
|
|
67
|
#\u662F\u5426\u8FDB\u884C\u63A5\u53E3\u6743\u9650\u63A7\u5236 1 \u8FDB\u884C\u63A5\u53E3\u6743\u9650\u63A7\u5236
|
|
68
|
is_check_interface=0
|
|
69
|
|
|
70
|
|
|
71
|
#BJYM\u4F7F\u7528
|
|
72
|
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginAuth4TestImpl
|
|
73
|
##\u5C0F\u7A0B\u5E8F\u4F7F\u7528
|
|
74
|
USER_LOGIN_AUTH_CLASS=com.wframe.usermanager.services.impl.UserLoginAuthImpl
|
|
75
|
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByTokenImpl
|
|
76
|
#USER_LOGIN_AUTH_CLASS=com.wframe.msgmanager.services.impl.UserLoginByToken4XblImpl
|
|
77
|
SIGN_KEY_CODE=TENANT_CODE
|