Commit 950510ff by 郑冰晶

优化graceful-shutdown;add matrix-datasource log

parent 7d00ea38
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -17,9 +17,31 @@ public class BizResponse<T> extends Response<T> { ...@@ -17,9 +17,31 @@ public class BizResponse<T> extends Response<T> {
super(code, msg); super(code, msg);
} }
public BizResponse(Integer code, String msg, T data) {
super(code, msg, data);
}
public boolean isSuccess() { public boolean isSuccess() {
return getCode() != null && getCode() == CommonConstant.Success.CODE; return getCode() != null && getCode().equals(CommonConstant.Success.CODE);
}
public static <T> BizResponse<T> success(T data) {
return new BizResponse<>(CommonConstant.Success.CODE, CommonConstant.Success.MSG, data);
}
public static <T> BizResponse<T> success(Integer code, String msg) {
return new BizResponse<>(code, msg);
} }
public static <T> BizResponse<T> success(Integer code, String msg,T data) {
return new BizResponse<>(code, msg, data);
}
public static <T> BizResponse<T> fail(Integer code, String msg) {
return new BizResponse<>(code, msg);
}
public static <T> BizResponse<T> fail(Integer code, String msg, T data) {
return new BizResponse<>(code, msg, data);
}
} }
...@@ -21,6 +21,12 @@ public class Response<T> implements Serializable { ...@@ -21,6 +21,12 @@ public class Response<T> implements Serializable {
this.msg = msg; this.msg = msg;
} }
public Response(Integer code, String msg, T data) {
this.code = code;
this.msg = msg;
this.data = data;
}
public Integer getCode() { public Integer getCode() {
return code; return code;
} }
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -2,17 +2,15 @@ package com.secoo.mall.common.util.http; ...@@ -2,17 +2,15 @@ package com.secoo.mall.common.util.http;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.secoo.mall.common.util.date.DateUtil;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.http.HttpEntity; import org.apache.http.*;
import org.apache.http.HttpResponse;
import org.apache.http.NameValuePair;
import org.apache.http.client.ClientProtocolException; import org.apache.http.client.ClientProtocolException;
import org.apache.http.client.config.RequestConfig; import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.entity.UrlEncodedFormEntity;
import org.apache.http.client.methods.*; import org.apache.http.client.methods.*;
import org.apache.http.client.utils.URIBuilder; import org.apache.http.client.utils.URIBuilder;
import org.apache.http.concurrent.FutureCallback; import org.apache.http.concurrent.FutureCallback;
import org.apache.http.conn.ConnectionKeepAliveStrategy;
import org.apache.http.conn.ssl.SSLConnectionSocketFactory; import org.apache.http.conn.ssl.SSLConnectionSocketFactory;
import org.apache.http.conn.ssl.TrustSelfSignedStrategy; import org.apache.http.conn.ssl.TrustSelfSignedStrategy;
import org.apache.http.entity.StringEntity; import org.apache.http.entity.StringEntity;
...@@ -21,8 +19,12 @@ import org.apache.http.impl.client.HttpClients; ...@@ -21,8 +19,12 @@ import org.apache.http.impl.client.HttpClients;
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
import org.apache.http.impl.nio.client.CloseableHttpAsyncClient; import org.apache.http.impl.nio.client.CloseableHttpAsyncClient;
import org.apache.http.impl.nio.client.HttpAsyncClients; import org.apache.http.impl.nio.client.HttpAsyncClients;
import org.apache.http.message.BasicHeaderElementIterator;
import org.apache.http.message.BasicNameValuePair; import org.apache.http.message.BasicNameValuePair;
import org.apache.http.protocol.HTTP;
import org.apache.http.protocol.HttpContext;
import org.apache.http.ssl.SSLContexts; import org.apache.http.ssl.SSLContexts;
import org.apache.http.util.Args;
import org.apache.http.util.EntityUtils; import org.apache.http.util.EntityUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
...@@ -36,7 +38,7 @@ import java.nio.charset.Charset; ...@@ -36,7 +38,7 @@ import java.nio.charset.Charset;
import java.security.KeyManagementException; import java.security.KeyManagementException;
import java.security.KeyStoreException; import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat; import java.time.LocalDateTime;
import java.util.*; import java.util.*;
/** /**
...@@ -48,13 +50,16 @@ public class HttpClientUtils { ...@@ -48,13 +50,16 @@ public class HttpClientUtils {
private static Logger LOG = LoggerFactory.getLogger(HttpClientUtils.class); private static Logger LOG = LoggerFactory.getLogger(HttpClientUtils.class);
private static PoolingHttpClientConnectionManager connMgr; private static final int CONNECT_TIMEOUT = 10000;
private static RequestConfig requestConfig; private static final int SOCKET_TIMEOUT = 60000;
private static final int CONNECT_TIMEOUT = 100000; private static final int REQUEST_TIMEOUT = 10000;
private static final int SOCKET_TIMEOUT = 100000; private static final int KEEPALIVE_TIMEOUT = 50000;
private static final int REQUEST_TIMEOUT = 2000;
private static final String CHARSET = "UTF-8"; private static final String CHARSET = "UTF-8";
private static final ConnectionKeepAliveStrategy connectionKeepAliveStrategy;
private static final PoolingHttpClientConnectionManager connMgr;
private static RequestConfig requestConfig;
static { static {
// 设置连接池 // 设置连接池
connMgr = new PoolingHttpClientConnectionManager(); connMgr = new PoolingHttpClientConnectionManager();
...@@ -69,8 +74,25 @@ public class HttpClientUtils { ...@@ -69,8 +74,25 @@ public class HttpClientUtils {
configBuilder.setConnectionRequestTimeout(REQUEST_TIMEOUT); configBuilder.setConnectionRequestTimeout(REQUEST_TIMEOUT);
// 等待数据超时时间 // 等待数据超时时间
configBuilder.setSocketTimeout(SOCKET_TIMEOUT); configBuilder.setSocketTimeout(SOCKET_TIMEOUT);
LOG.debug("Http参数设置,连接超时时间[{}],Socket超时时间[{}],请求超时时间[{}]", CONNECT_TIMEOUT, SOCKET_TIMEOUT); LOG.debug("Http参数设置,连接超时时间[{}],Socket超时时间[{}],请求超时时间[{}]", CONNECT_TIMEOUT, SOCKET_TIMEOUT,REQUEST_TIMEOUT);
requestConfig = configBuilder.build(); requestConfig = configBuilder.build();
connectionKeepAliveStrategy = new ConnectionKeepAliveStrategy() {
@Override
public long getKeepAliveDuration(HttpResponse httpResponse, HttpContext httpContext) {
Args.notNull(httpResponse, "HTTP response");
final HeaderElementIterator it = new BasicHeaderElementIterator(httpResponse.headerIterator(HTTP.CONN_KEEP_ALIVE));
while (it.hasNext()) {
final HeaderElement he = it.nextElement();
final String param = he.getName();
final String value = he.getValue();
if (value != null && param.equalsIgnoreCase("timeout")) {
return Long.parseLong(value) * 1000;
}
}
return KEEPALIVE_TIMEOUT;
}
};
} }
/** /**
...@@ -103,7 +125,7 @@ public class HttpClientUtils { ...@@ -103,7 +125,7 @@ public class HttpClientUtils {
String result = doGet(url, new HashMap<>(10)); String result = doGet(url, new HashMap<>(10));
return result; return result;
} catch (Exception e) { } catch (Exception e) {
LOG.error("发送 GET 请求ERROR :{}", e); LOG.error("发送 GET 请求ERROR:", e);
} }
return ""; return "";
} }
...@@ -125,7 +147,7 @@ public class HttpClientUtils { ...@@ -125,7 +147,7 @@ public class HttpClientUtils {
String result = null; String result = null;
if (StringUtils.isEmpty(url)) { if (StringUtils.isEmpty(url)) {
LOG.debug("warn:doGet url is null or '' "); LOG.warn("doGet url is null or '' ");
return result; return result;
} }
...@@ -133,8 +155,11 @@ public class HttpClientUtils { ...@@ -133,8 +155,11 @@ public class HttpClientUtils {
for (Map.Entry<String, Object> entry : params.entrySet()) { for (Map.Entry<String, Object> entry : params.entrySet()) {
pairList.add(new BasicNameValuePair(entry.getKey(), entry.getValue().toString())); pairList.add(new BasicNameValuePair(entry.getKey(), entry.getValue().toString()));
} }
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(requestConfig) CloseableHttpClient httpclient = HttpClients.custom()
.setConnectionManager(connMgr).build(); .setDefaultRequestConfig(requestConfig)
.setConnectionManager(connMgr)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
CloseableHttpResponse response = null; CloseableHttpResponse response = null;
InputStream instream = null; InputStream instream = null;
try { try {
...@@ -169,15 +194,16 @@ public class HttpClientUtils { ...@@ -169,15 +194,16 @@ public class HttpClientUtils {
} }
public static HttpEntity doGetByDefault(String url) throws Exception { public static HttpEntity doGetByDefault(String url) throws Exception {
CloseableHttpClient httpclient = HttpClients.custom()
.setDefaultRequestConfig(requestConfig)
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(requestConfig) .setConnectionManager(connMgr)
.setConnectionManager(connMgr).build(); .setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
HttpGet httpGet = new HttpGet(url); HttpGet httpGet = new HttpGet(url);
CloseableHttpResponse response = httpclient.execute(httpGet); CloseableHttpResponse response = httpclient.execute(httpGet);
LOG.info("doGet statusCode:{}", response.getStatusLine().getStatusCode()); LOG.debug("doGet statusCode:{}", response.getStatusLine().getStatusCode());
return response.getEntity(); return response.getEntity();
...@@ -186,8 +212,11 @@ public class HttpClientUtils { ...@@ -186,8 +212,11 @@ public class HttpClientUtils {
public static String doDelete(String url, Map<String, String> headers, Map<String, String> params) throws Exception { public static String doDelete(String url, Map<String, String> headers, Map<String, String> params) throws Exception {
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(requestConfig) CloseableHttpClient httpclient = HttpClients.custom()
.setConnectionManager(connMgr).build(); .setDefaultRequestConfig(requestConfig)
.setConnectionManager(connMgr)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
CloseableHttpResponse response = null; CloseableHttpResponse response = null;
InputStream instream = null; InputStream instream = null;
List<NameValuePair> pairList = new ArrayList<>(params.size()); List<NameValuePair> pairList = new ArrayList<>(params.size());
...@@ -209,7 +238,7 @@ public class HttpClientUtils { ...@@ -209,7 +238,7 @@ public class HttpClientUtils {
response = httpclient.execute(httpDelete); response = httpclient.execute(httpDelete);
LOG.info("httpDelete statusCode:{}", response.getStatusLine().getStatusCode()); LOG.debug("httpDelete statusCode:{}", response.getStatusLine().getStatusCode());
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
if (entity != null) { if (entity != null) {
...@@ -251,8 +280,11 @@ public class HttpClientUtils { ...@@ -251,8 +280,11 @@ public class HttpClientUtils {
}); });
CloseableHttpClient httpclient = HttpClients.custom().setDefaultRequestConfig(requestConfig) CloseableHttpClient httpclient = HttpClients.custom()
.setConnectionManager(connMgr).build(); .setDefaultRequestConfig(requestConfig)
.setConnectionManager(connMgr)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
CloseableHttpResponse response = null; CloseableHttpResponse response = null;
InputStream instream = null; InputStream instream = null;
try { try {
...@@ -272,7 +304,7 @@ public class HttpClientUtils { ...@@ -272,7 +304,7 @@ public class HttpClientUtils {
} }
response = httpclient.execute(httpPut); response = httpclient.execute(httpPut);
LOG.info("doGet statusCode:{}", response.getStatusLine().getStatusCode()); LOG.debug("doGet statusCode:{}", response.getStatusLine().getStatusCode());
HttpEntity entity = response.getEntity(); HttpEntity entity = response.getEntity();
if (entity != null) { if (entity != null) {
...@@ -315,7 +347,7 @@ public class HttpClientUtils { ...@@ -315,7 +347,7 @@ public class HttpClientUtils {
public static String doPost(String url, Map<String, Object> params) throws Exception { public static String doPost(String url, Map<String, Object> params) throws Exception {
if (StringUtils.isEmpty(url)) { if (StringUtils.isEmpty(url)) {
LOG.info("warn:doPost url is null or '' "); LOG.warn("doPost url is null or '' ");
return null; return null;
} }
List<NameValuePair> pairList = new ArrayList<>(params.size()); List<NameValuePair> pairList = new ArrayList<>(params.size());
...@@ -339,7 +371,7 @@ public class HttpClientUtils { ...@@ -339,7 +371,7 @@ public class HttpClientUtils {
public static String doPost(String url, String xml) throws Exception { public static String doPost(String url, String xml) throws Exception {
if (StringUtils.isEmpty(url)) { if (StringUtils.isEmpty(url)) {
LOG.info("warn:doPost url is null or '' "); LOG.warn("doPost url is null or '' ");
return null; return null;
} }
...@@ -359,7 +391,7 @@ public class HttpClientUtils { ...@@ -359,7 +391,7 @@ public class HttpClientUtils {
public static String doPost(String url, Object json) throws Exception { public static String doPost(String url, Object json) throws Exception {
if (StringUtils.isEmpty(url)) { if (StringUtils.isEmpty(url)) {
LOG.error("warn:doPostByJson url is null or '' "); LOG.warn("doPostByJson url is null or '' ");
return null; return null;
} }
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
...@@ -373,7 +405,7 @@ public class HttpClientUtils { ...@@ -373,7 +405,7 @@ public class HttpClientUtils {
public static String doPost(String url, HttpEntity entity, Map<String, String> headers) throws Exception { public static String doPost(String url, HttpEntity entity, Map<String, String> headers) throws Exception {
if (StringUtils.isEmpty(url)) { if (StringUtils.isEmpty(url)) {
LOG.error("warn:doPostByJson url is null or '' "); LOG.warn("doPostByJson url is null or '' ");
return null; return null;
} }
HttpPost httpPost = new HttpPost(url); HttpPost httpPost = new HttpPost(url);
...@@ -396,7 +428,7 @@ public class HttpClientUtils { ...@@ -396,7 +428,7 @@ public class HttpClientUtils {
public static String doPostSsl(String apiUrl, Map<String, Object> params) throws Exception { public static String doPostSsl(String apiUrl, Map<String, Object> params) throws Exception {
if (StringUtils.isEmpty(apiUrl)) { if (StringUtils.isEmpty(apiUrl)) {
LOG.info("warn:doPostSSL url is null or '' "); LOG.warn("doPostSSL url is null or '' ");
return null; return null;
} }
...@@ -421,7 +453,7 @@ public class HttpClientUtils { ...@@ -421,7 +453,7 @@ public class HttpClientUtils {
public static String doPostSsl(String apiUrl, Object json) throws Exception { public static String doPostSsl(String apiUrl, Object json) throws Exception {
if (StringUtils.isEmpty(apiUrl)) { if (StringUtils.isEmpty(apiUrl)) {
LOG.info("warn:doPostSSL By Json url is null or '' "); LOG.warn("doPostSSL By Json url is null or '' ");
return null; return null;
} }
...@@ -456,10 +488,17 @@ public class HttpClientUtils { ...@@ -456,10 +488,17 @@ public class HttpClientUtils {
SSLContext sslcontext = SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy()) SSLContext sslcontext = SSLContexts.custom().loadTrustMaterial(null, new TrustSelfSignedStrategy())
.build(); .build();
SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext); SSLConnectionSocketFactory sslsf = new SSLConnectionSocketFactory(sslcontext);
httpClient = HttpClients.custom().setConnectionManager(connMgr).setSSLSocketFactory(sslsf) httpClient = HttpClients.custom()
.setDefaultRequestConfig(requestConfig).build(); .setConnectionManager(connMgr)
.setSSLSocketFactory(sslsf)
.setDefaultRequestConfig(requestConfig)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
} else { } else {
httpClient = HttpClients.custom().setDefaultRequestConfig(requestConfig).setConnectionManager(connMgr) httpClient = HttpClients.custom()
.setDefaultRequestConfig(requestConfig)
.setConnectionManager(connMgr)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build(); .build();
} }
response = httpClient.execute(httpPost); response = httpClient.execute(httpPost);
...@@ -497,15 +536,18 @@ public class HttpClientUtils { ...@@ -497,15 +536,18 @@ public class HttpClientUtils {
final String[] content = new String[1]; final String[] content = new String[1];
content[0]=""; content[0]="";
// 传入HttpPost request // 传入HttpPost request
CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom().setDefaultRequestConfig(requestConfig).build(); CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom()
LOG.info("httpclient test begin time:{}", DateUtil.getDateTime()); .setDefaultRequestConfig(requestConfig)
.setKeepAliveStrategy(connectionKeepAliveStrategy)
.build();
LOG.debug("httpclient test begin time:{}", LocalDateTime.now());
httpclient.start(); httpclient.start();
httpclient.execute(request, new FutureCallback<HttpResponse>() { httpclient.execute(request, new FutureCallback<HttpResponse>() {
@Override @Override
public void completed(final HttpResponse response) { public void completed(final HttpResponse response) {
LOG.info(request.getRequestLine() + "->" + response.getStatusLine()); LOG.debug(request.getRequestLine() + "->" + response.getStatusLine());
LOG.info("httpclient test received content time:{}",DateUtil.getDateTime()); LOG.debug("httpclient test received content time:{}",LocalDateTime.now());
try { try {
content[0] = EntityUtils.toString(response.getEntity(), "UTF-8"); content[0] = EntityUtils.toString(response.getEntity(), "UTF-8");
} catch (IOException e) { } catch (IOException e) {
...@@ -514,16 +556,16 @@ public class HttpClientUtils { ...@@ -514,16 +556,16 @@ public class HttpClientUtils {
} }
@Override @Override
public void failed(final Exception ex) { public void failed(final Exception ex) {
LOG.info("httpclient test received failed time:{}",DateUtil.getDateTime()); LOG.debug("httpclient test received failed time:{}", LocalDateTime.now());
LOG.error(request.getRequestLine() + "->" + ex); LOG.error(request.getRequestLine() + "->", ex);
} }
@Override @Override
public void cancelled() { public void cancelled() {
LOG.info("httpclient test received cancelled time:{}",DateUtil.getDateTime()); LOG.debug("httpclient test received cancelled time:{}",LocalDateTime.now());
LOG.error(request.getRequestLine() + " cancelled"); LOG.warn(request.getRequestLine() + " cancelled");
} }
}); });
LOG.info("httpclient test end time:{}",DateUtil.getDateTime()); LOG.debug("httpclient test end time:{}",LocalDateTime.now());
return content[0]; return content[0];
} }
......
...@@ -78,7 +78,7 @@ public class StringUtil extends StringUtils { ...@@ -78,7 +78,7 @@ public class StringUtil extends StringUtils {
} }
public static String line(){ public static String line(){
String lineSeparator = System.getProperty("line.separator", "\n"); String lineSeparator = System.getProperty("line.separator", String.valueOf(CharConstant.LF));
return lineSeparator; return lineSeparator;
} }
...@@ -95,5 +95,9 @@ public class StringUtil extends StringUtils { ...@@ -95,5 +95,9 @@ public class StringUtil extends StringUtils {
System.out.println("toHyphen=="+toHyphen(str3,'-')); System.out.println("toHyphen=="+toHyphen(str3,'-'));
System.out.println(toSnakeCase("test-jdate", '-')); System.out.println(toSnakeCase("test-jdate", '-'));
System.out.println(line());
System.out.println("========");
} }
} }
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-bigdata</artifactId> <artifactId>matrix-bigdata</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-bigdata</artifactId> <artifactId>matrix-bigdata</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-bus</artifactId> <artifactId>matrix-bus</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-client</artifactId> <artifactId>matrix-client</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-datahelper</artifactId> <artifactId>matrix-datahelper</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-datahelper</artifactId> <artifactId>matrix-datahelper</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datahelper-redis-core</artifactId> <artifactId>matrix-datahelper-redis-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
</dependencies> </dependencies>
</dependencyManagement> </dependencyManagement>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-datasource</artifactId> <artifactId>matrix-datasource</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -13,6 +13,7 @@ import com.secoo.mall.datasource.constant.DataSourceConstant; ...@@ -13,6 +13,7 @@ import com.secoo.mall.datasource.constant.DataSourceConstant;
import com.secoo.mall.datasource.errorcode.DataSourceError; import com.secoo.mall.datasource.errorcode.DataSourceError;
import com.secoo.mall.datasource.util.SysUtil; import com.secoo.mall.datasource.util.SysUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.time.StopWatch;
import java.io.InputStream; import java.io.InputStream;
import java.net.HttpURLConnection; import java.net.HttpURLConnection;
...@@ -60,6 +61,9 @@ public class EncryptorFactory<T> { ...@@ -60,6 +61,9 @@ public class EncryptorFactory<T> {
* @return * @return
*/ */
private String initPrivateKey() { private String initPrivateKey() {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
String appId = configUtil.getAppId(); String appId = configUtil.getAppId();
if (StringUtil.isEmpty(appId)) { if (StringUtil.isEmpty(appId)) {
throw new BusinessException(DataSourceError.APP_ID_NOT_EXIST); throw new BusinessException(DataSourceError.APP_ID_NOT_EXIST);
...@@ -84,11 +88,14 @@ public class EncryptorFactory<T> { ...@@ -84,11 +88,14 @@ public class EncryptorFactory<T> {
return String.join("", strings); return String.join("", strings);
} }
} catch (Exception e) { } catch (Exception e) {
log.error("connetion server error", e); log.error("", e);
} finally { } finally {
if (connection != null) { if (connection != null) {
connection.disconnect(); connection.disconnect();
} }
stopWatch.stop();
log.info("init PrivateKey elapsed {}ms",stopWatch.getTime());
} }
return null; return null;
...@@ -96,15 +103,21 @@ public class EncryptorFactory<T> { ...@@ -96,15 +103,21 @@ public class EncryptorFactory<T> {
private void createEncryptor() { private void createEncryptor() {
if (StringUtil.isNotEmpty(this.privateKey)) { if (StringUtil.isNotEmpty(this.privateKey)) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
MatrixUrlClassLoader.getInstance().loadByUrl(DataSourceConstant.SECURITY_FILE_JAR_PATH); MatrixUrlClassLoader.getInstance().loadByUrl(DataSourceConstant.SECURITY_FILE_JAR_PATH);
String[] args = this.privateKey.split(DataSourceConstant.ENCRY_FLAG); String[] args = this.privateKey.split(DataSourceConstant.ENCRY_FLAG);
encryptor = MatrixUrlClassLoader.getInstance().loadClassByFullName("com.secoo.mall.app.security.encryptor.StringEncryptor", Encryptor.class, new Class[]{String.class, String.class}, args); encryptor = MatrixUrlClassLoader.getInstance().loadClassByFullName("com.secoo.mall.app.security.encryptor.StringEncryptor", Encryptor.class, new Class[]{String.class, String.class}, args);
stopWatch.stop();
log.info("create Encryptor elapsed {}ms",stopWatch.getTime());
} }
/** /**
* 如果无法从远程创建解密对象,则进行降级处理 * 如果无法从远程创建解密对象,则进行降级处理
*/ */
if (Objects.isNull(encryptor)) { if (Objects.isNull(encryptor)) {
log.warn("load remote encryptor fail.use default encryptor"); log.warn("load remote encryptor fail, use default encryptor");
encryptor = new Encryptor<T>() { encryptor = new Encryptor<T>() {
@Override @Override
public T encrypt(T value) { public T encrypt(T value) {
......
...@@ -14,6 +14,7 @@ import com.secoo.mall.datasource.properties.MatrixDataSourceProperties; ...@@ -14,6 +14,7 @@ import com.secoo.mall.datasource.properties.MatrixDataSourceProperties;
import com.secoo.mall.datasource.util.SysUtil; import com.secoo.mall.datasource.util.SysUtil;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.reflect.MethodUtils; import org.apache.commons.lang3.reflect.MethodUtils;
import org.apache.commons.lang3.time.StopWatch;
import javax.sql.DataSource; import javax.sql.DataSource;
import java.lang.reflect.Field; import java.lang.reflect.Field;
...@@ -34,9 +35,14 @@ public class ApolloDataSourceProvider<T extends MatrixDataSourceConfig> extends ...@@ -34,9 +35,14 @@ public class ApolloDataSourceProvider<T extends MatrixDataSourceConfig> extends
@Override @Override
protected List<T> getDataSourceProperties() { protected List<T> getDataSourceProperties() {
log.info("load config from apollo..."); log.info("load config from apollo...");
StopWatch stopWatch = new StopWatch();
stopWatch.start();
Config appConfig = ConfigService.getConfig(DataSourceConstant.DB_NAMESPACE); Config appConfig = ConfigService.getConfig(DataSourceConstant.DB_NAMESPACE);
Set<String> propertyNames = appConfig.getPropertyNames(); Set<String> propertyNames = appConfig.getPropertyNames();
List<T> list = Lists.newArrayList();
stopWatch.stop();
log.info("load config from apollo elapsed {}ms",stopWatch.getTime());
Map<String, DataSource> dataSourceMap = new HashMap<>(); Map<String, DataSource> dataSourceMap = new HashMap<>();
...@@ -50,6 +56,7 @@ public class ApolloDataSourceProvider<T extends MatrixDataSourceConfig> extends ...@@ -50,6 +56,7 @@ public class ApolloDataSourceProvider<T extends MatrixDataSourceConfig> extends
Map<String, Class> fieldMap = FieldUtil.getAllFieldsList(getEntryClass()).stream().collect(Collectors.toMap(Field::getName, Field::getType, (key1, key2) -> key1)); Map<String, Class> fieldMap = FieldUtil.getAllFieldsList(getEntryClass()).stream().collect(Collectors.toMap(Field::getName, Field::getType, (key1, key2) -> key1));
Set<String> notSupportPropertySet = new HashSet<>(); Set<String> notSupportPropertySet = new HashSet<>();
List<T> list = Lists.newArrayList();
try { try {
for (Map.Entry<String, List<String>> entry : dsPpropertyMap.entrySet()) { for (Map.Entry<String, List<String>> entry : dsPpropertyMap.entrySet()) {
String dsName = entry.getKey(); String dsName = entry.getKey();
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-datasource</artifactId> <artifactId>matrix-datasource</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-core</artifactId> <artifactId>matrix-datasource-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
package com.secoo.mall.gracefulshutdown.autoconfigure; package com.secoo.mall.gracefulshutdown.autoconfigure;
import com.secoo.mall.common.core.service.UpDatas; import com.secoo.mall.gracefulshutdown.component.UpDatas;
import com.secoo.mall.common.util.string.StringUtil;
import com.secoo.mall.gracefulshutdown.component.ShutDownDataReportAsyncHttp; import com.secoo.mall.gracefulshutdown.component.ShutDownDataReportAsyncHttp;
import com.secoo.mall.gracefulshutdown.monitor.config.ConfigCenter; import com.secoo.mall.gracefulshutdown.monitor.config.ConfigCenter;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.exception.ConfigurationException;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.ProviderService; import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.ProviderService;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.RegistryServerSync; import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.RegistryServerSync;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.impl.ProviderServiceImpl; import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.impl.ProviderServiceImpl;
import com.secoo.mall.gracefulshutdown.monitor.utils.Tool; import com.secoo.mall.gracefulshutdown.monitor.utils.Tool;
import com.secoo.mall.gracefulshutdown.component.GracefulShutDown; import com.secoo.mall.gracefulshutdown.component.GracefulShutDown;
import com.secoo.mall.gracefulshutdown.component.ShutDownDataReport;
import com.secoo.mall.gracefulshutdown.component.TomcatGracefulShutDown; import com.secoo.mall.gracefulshutdown.component.TomcatGracefulShutDown;
import com.secoo.mall.gracefulshutdown.component.hook.DubboCustomerShutDownHook; import com.secoo.mall.gracefulshutdown.component.hook.DubboCustomerShutDownHook;
import com.secoo.mall.gracefulshutdown.component.hook.TomcatShutDownHook; import com.secoo.mall.gracefulshutdown.component.hook.TomcatShutDownHook;
import org.apache.commons.lang3.StringUtils;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.common.extension.ExtensionLoader;
import org.apache.dubbo.registry.Registry; import org.apache.dubbo.registry.Registry;
......
package com.secoo.mall.gracefulshutdown.component; package com.secoo.mall.gracefulshutdown.component;
import com.secoo.mall.common.core.service.StopService; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetail;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetail;
public abstract class AbstractShutDown implements StopService<ExecutorDetail>,Comparable { public abstract class AbstractShutDown implements StopService<ExecutorDetail>,Comparable {
//定义执行顺序 //定义执行顺序
......
...@@ -2,9 +2,7 @@ package com.secoo.mall.gracefulshutdown.component; ...@@ -2,9 +2,7 @@ package com.secoo.mall.gracefulshutdown.component;
public class ConfigConstant { public class ConfigConstant {
// public static String EXWARN="http://172.17.76.196:6080/gracefulshutdown/gracefulSave"; public static String EXWARN_URL ="http://exwarn.secoo.com/gracefulshutdown/gracefulSave";
// public static String EXWARN="http://test-exwarn.secoo.com/gracefulshutdown/gracefulSave";
public static String EXWARN="http://exwarn.secoo.com/gracefulshutdown/gracefulSave";
public static final int CONNECT_TIMEOUT = 1000;//连接超时时间 public static final int CONNECT_TIMEOUT = 1000;//连接超时时间
public static final int SOCKET_TIMEOUT = 5000;//等待数据超时时间 public static final int SOCKET_TIMEOUT = 5000;//等待数据超时时间
......
package com.secoo.mall.gracefulshutdown.component; package com.secoo.mall.gracefulshutdown.component;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetail; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetail;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetails; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetails;
import com.secoo.mall.common.core.service.StopService;
import com.secoo.mall.common.core.service.UpDatas;
import com.secoo.mall.common.util.date.DateUtil; import com.secoo.mall.common.util.date.DateUtil;
import com.secoo.mall.common.util.log.LoggerUtil; import com.secoo.mall.common.util.log.LoggerUtil;
import com.secoo.mall.gracefulshutdown.monitor.utils.Tool; import com.secoo.mall.gracefulshutdown.monitor.utils.Tool;
import com.secoo.mall.gracefulshutdown.component.hook.TomcatShutDownHook;
import org.apache.dubbo.common.utils.NetUtils; import org.apache.dubbo.common.utils.NetUtils;
import org.apache.dubbo.config.DubboShutdownHook; import org.apache.dubbo.config.DubboShutdownHook;
import org.apache.dubbo.config.spring.extension.SpringExtensionFactory; import org.apache.dubbo.config.spring.extension.SpringExtensionFactory;
......
package com.secoo.mall.gracefulshutdown.component; package com.secoo.mall.gracefulshutdown.component;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.secoo.mall.common.core.service.UpDatas;
import com.secoo.mall.common.util.log.LoggerUtil; import com.secoo.mall.common.util.log.LoggerUtil;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetails; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetails;
import com.secoo.mall.common.util.string.StringUtil; import com.secoo.mall.common.util.string.StringUtil;
import org.apache.dubbo.common.URL; import org.apache.dubbo.common.URL;
import org.apache.dubbo.common.extension.ExtensionLoader; import org.apache.dubbo.common.extension.ExtensionLoader;
......
package com.secoo.mall.gracefulshutdown.component; package com.secoo.mall.gracefulshutdown.component;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetails; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetails;
import com.secoo.mall.common.core.service.UpDatas;
import com.secoo.mall.common.util.http.HttpClientUtils; import com.secoo.mall.common.util.http.HttpClientUtils;
import org.apache.http.NameValuePair; import org.apache.http.NameValuePair;
import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.entity.UrlEncodedFormEntity;
...@@ -22,7 +21,7 @@ public class ShutDownDataReportAsyncHttp implements UpDatas<ExecutorDetails> { ...@@ -22,7 +21,7 @@ public class ShutDownDataReportAsyncHttp implements UpDatas<ExecutorDetails> {
try { try {
String result=JSON.toJSONString(obj); String result=JSON.toJSONString(obj);
HttpPost httpPost = new HttpPost(ConfigConstant.EXWARN); HttpPost httpPost = new HttpPost(ConfigConstant.EXWARN_URL);
List<NameValuePair> nvps = new ArrayList<NameValuePair>(); List<NameValuePair> nvps = new ArrayList<NameValuePair>();
nvps.add(new BasicNameValuePair("gracefulresult", result)); nvps.add(new BasicNameValuePair("gracefulresult", result));
HttpClientUtils.setHttpParam(ConfigConstant.CONNECT_TIMEOUT,ConfigConstant.SOCKET_TIMEOUT,ConfigConstant.REQUEST_TIMEOUT); HttpClientUtils.setHttpParam(ConfigConstant.CONNECT_TIMEOUT,ConfigConstant.SOCKET_TIMEOUT,ConfigConstant.REQUEST_TIMEOUT);
......
package com.secoo.mall.common.core.service; package com.secoo.mall.gracefulshutdown.component;
public interface StopService <T>{ public interface StopService <T>{
......
package com.secoo.mall.common.core.service; package com.secoo.mall.gracefulshutdown.component;
public interface UpDatas<T> { public interface UpDatas<T> {
public boolean upData(T t) throws Exception; public boolean upData(T t) throws Exception;
......
package com.secoo.mall.gracefulshutdown.component.hook; package com.secoo.mall.gracefulshutdown.component.hook;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetail; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetail;
import com.secoo.mall.common.util.date.DateUtil; import com.secoo.mall.common.util.date.DateUtil;
import com.secoo.mall.common.util.log.LoggerUtil; import com.secoo.mall.common.util.log.LoggerUtil;
import com.secoo.mall.common.util.string.StringUtil; import com.secoo.mall.common.util.string.StringUtil;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.Constants.Constants;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.ProviderService; import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.ProviderService;
import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.RegistryServerSync; import com.secoo.mall.gracefulshutdown.monitor.dubbo.service.RegistryServerSync;
import com.secoo.mall.gracefulshutdown.monitor.utils.Stack; import com.secoo.mall.gracefulshutdown.monitor.utils.Stack;
......
...@@ -2,7 +2,7 @@ package com.secoo.mall.gracefulshutdown.component.hook; ...@@ -2,7 +2,7 @@ package com.secoo.mall.gracefulshutdown.component.hook;
import com.secoo.mall.common.util.date.DateUtil; import com.secoo.mall.common.util.date.DateUtil;
import com.secoo.mall.common.util.string.StringUtil; import com.secoo.mall.common.util.string.StringUtil;
import com.secoo.mall.common.core.bean.gracefulshowtdownBean.ExecutorDetail; import com.secoo.mall.gracefulshutdown.component.model.ExecutorDetail;
import com.secoo.mall.gracefulshutdown.component.AbstractShutDown; import com.secoo.mall.gracefulshutdown.component.AbstractShutDown;
import org.apache.catalina.connector.Connector; import org.apache.catalina.connector.Connector;
import java.util.ArrayList; import java.util.ArrayList;
......
package com.secoo.mall.common.core.bean.gracefulshowtdownBean; package com.secoo.mall.gracefulshutdown.component.model;
public class AbstractTransportData<T> { public class AbstractTransportData<T> {
T t; T t;
......
package com.secoo.mall.common.core.bean.gracefulshowtdownBean; package com.secoo.mall.gracefulshutdown.component.model;
import java.util.List; import java.util.List;
......
package com.secoo.mall.common.core.bean.gracefulshowtdownBean; package com.secoo.mall.gracefulshutdown.component.model;
import java.util.List; import java.util.List;
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-job</artifactId> <artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-job</artifactId> <artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-job</artifactId> <artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -21,12 +21,12 @@ ...@@ -21,12 +21,12 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-core</artifactId> <artifactId>matrix-job-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-core</artifactId> <artifactId>matrix-job-xxl-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo</groupId> <groupId>com.secoo</groupId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-mq</artifactId> <artifactId>matrix-mq</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-mq</artifactId> <artifactId>matrix-mq</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-mq</artifactId> <artifactId>matrix-mq</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mq-rocketmq-core</artifactId> <artifactId>matrix-mq-rocketmq-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.apache.rocketmq</groupId> <groupId>org.apache.rocketmq</groupId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-mybatis</artifactId> <artifactId>matrix-mybatis</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-mybatis</artifactId> <artifactId>matrix-mybatis</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -25,17 +25,17 @@ ...@@ -25,17 +25,17 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-core</artifactId> <artifactId>matrix-mybatis-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-druid</artifactId> <artifactId>matrix-datasource-druid</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-starter</artifactId> <artifactId>matrix-mybatis-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.baomidou</groupId> <groupId>com.baomidou</groupId>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-protocol</artifactId> <artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-protocol</artifactId> <artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-protocol</artifactId> <artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-protocol</artifactId> <artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix-protocol</artifactId> <artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
...@@ -29,27 +29,27 @@ ...@@ -29,27 +29,27 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-core</artifactId> <artifactId>matrix-protocol-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-core</artifactId> <artifactId>matrix-protocol-web-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-core</artifactId> <artifactId>matrix-protocol-dubbo-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-starter</artifactId> <artifactId>matrix-protocol-web-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-starter</artifactId> <artifactId>matrix-protocol-dubbo-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<!-- Aapche Dubbo --> <!-- Aapche Dubbo -->
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix</artifactId> <artifactId>matrix</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
<packaging>pom</packaging> <packaging>pom</packaging>
...@@ -54,119 +54,119 @@ ...@@ -54,119 +54,119 @@
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>logger-starter</artifactId> <artifactId>logger-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-core</artifactId> <artifactId>common-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>config-starter</artifactId> <artifactId>config-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>common-util</artifactId> <artifactId>common-util</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-druid</artifactId> <artifactId>matrix-datasource-druid</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-core</artifactId> <artifactId>matrix-mybatis-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-starter</artifactId> <artifactId>matrix-mybatis-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mq-rocketmq-core</artifactId> <artifactId>matrix-mq-rocketmq-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mq-rocketmq-client</artifactId> <artifactId>matrix-mq-rocketmq-client</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<!--rocketmq-starter废弃,启用matrix-mq-rocketmq-starter--> <!--rocketmq-starter废弃,启用matrix-mq-rocketmq-starter-->
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-mq-rocketmq-starter</artifactId> <artifactId>matrix-mq-rocketmq-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-core</artifactId> <artifactId>matrix-protocol-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-core</artifactId> <artifactId>matrix-protocol-dubbo-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-starter</artifactId> <artifactId>matrix-protocol-dubbo-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-core</artifactId> <artifactId>matrix-protocol-web-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-starter</artifactId> <artifactId>matrix-protocol-web-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-core</artifactId> <artifactId>matrix-job-xxl-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-starter</artifactId> <artifactId>matrix-job-xxl-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-bigdata-hbase-starter</artifactId> <artifactId>matrix-bigdata-hbase-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<!--redis--> <!--redis-->
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datahelper-redis-core</artifactId> <artifactId>matrix-datahelper-redis-core</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-datahelper-redis-starter</artifactId> <artifactId>matrix-datahelper-redis-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-client-openfeign-starter</artifactId> <artifactId>matrix-client-openfeign-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<!-- bus --> <!-- bus -->
<dependency> <dependency>
<groupId>com.secoo.mall</groupId> <groupId>com.secoo.mall</groupId>
<artifactId>matrix-bus-canal-starter</artifactId> <artifactId>matrix-bus-canal-starter</artifactId>
<version>2.0.17.RELEASE</version> <version>2.0.18.RELEASE</version>
</dependency> </dependency>
<!--普通jar--> <!--普通jar-->
...@@ -196,11 +196,6 @@ ...@@ -196,11 +196,6 @@
<version>1.2.58</version> <version>1.2.58</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.esotericsoftware</groupId>
<artifactId>kryo</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>com.lmax</groupId> <groupId>com.lmax</groupId>
<artifactId>disruptor</artifactId> <artifactId>disruptor</artifactId>
<version>3.4.2</version> <version>3.4.2</version>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment