Commit 3761d857 by 李秋伟

Merge branch 'feature_protocol' into 'master'

1.修复dubbo启动错误

See merge request mall/arch/matrix!59
parents e102ce60 6746470e
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
package com.secoo.mall.common.core.errorcode;
public class ErrorCode {
import java.io.Serializable;
public class ErrorCode implements Serializable {
private Integer code;
private String msg;
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -11,8 +11,7 @@ public class SpringUtil implements ApplicationContextAware {
private static ApplicationContext context;
@Override
public void setApplicationContext(ApplicationContext arg0)
throws BeansException {
public void setApplicationContext(ApplicationContext arg0) throws BeansException {
context = arg0;
}
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-datasource</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-datasource</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -21,7 +21,7 @@
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -17,7 +17,7 @@
</dependency>
<dependency>
<groupId>com.secoo</groupId>
<artifactId>xxl-job-core</artifactId>
<artifactId>secoo-xxl-job-core</artifactId>
</dependency>
</dependencies>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-job</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -2,8 +2,8 @@ package com.secoo.mall.xxl.spring.boot.autoconfigure;
import com.secoo.mall.job.client.JobClient;
import com.secoo.mall.xxl.client.MatrixXxlJobClient;
import com.xxl.job.core.executor.XxlJobExecutor;
import com.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import com.secoo.xxl.job.core.executor.XxlJobExecutor;
import com.secoo.xxl.job.core.executor.impl.XxlJobSpringExecutor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
......
......@@ -11,9 +11,19 @@ import org.springframework.boot.context.properties.NestedConfigurationProperty;
public class MatrixXxlJobBootProperties extends MatrixXxlJobProperties {
public static final String PREFIX = "xxl.job";
private Boolean enabled;
@NestedConfigurationProperty
private MatrixXxlJobProperties.Executor executor;
public Boolean getEnabled() {
return enabled;
}
public void setEnabled(Boolean enabled) {
this.enabled = enabled;
}
@Override
@Value("${spring.application.name}")
public void setAppName(String appName) {
......
xxl:
job:
executor:
ip: 190.189.90.1
\ No newline at end of file
ip: 127.0.0.1 # #默认为空
port:
access-token: #默认为空
log-path: #xxl日志存储地址,
log-retention-days: #日志保存时间,默认7天
#app-name: 默认会读取spring.application.name或者-Dapp.id
admin-addresses: #xxl-admin访问地址,如开发环境 http://job.secoolocal.com
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -21,17 +21,17 @@
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo</groupId>
<artifactId>xxl-job-core</artifactId>
<version>2.1.0-secoo1.1</version>
<artifactId>secoo-xxl-job-core</artifactId>
<version>2.1.0-secoo1.2</version>
</dependency>
</dependencies>
</dependencyManagement>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-mq</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-mq</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-mybatis</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-mybatis</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -25,17 +25,17 @@
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-druid</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.baomidou</groupId>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -54,6 +54,11 @@ public class ProtocolExceptionHandler {
if (messageSource == null) {
return e.getMsg();
}
return messageSource.getMessage(e.getMsg(), e.getArgs(), LocaleContextHolder.getLocale());
try {
return messageSource.getMessage(e.getMsg(), e.getArgs(), LocaleContextHolder.getLocale());
} catch (Exception ex) {
return String.format("[%s] not exsits.Please check config message_%s.properties.",e.getMsg(), LocaleContextHolder.getLocale());
}
}
}
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -14,9 +14,9 @@ import java.lang.reflect.Method;
/**
* 统一拦截异常。
*/
@Activate(
/*@Activate(
group = {CommonConstants.PROVIDER}
)
)*/
public class MatrixExceptionFilter extends ListenableFilter {
public MatrixExceptionFilter() {
super.listener = new MatrixExceptionFilter.ExceptionListener();
......@@ -29,7 +29,7 @@ public class MatrixExceptionFilter extends ListenableFilter {
static class ExceptionListener implements Listener {
private Logger logger = LoggerFactory.getLogger(MatrixExceptionFilter.ExceptionListener.class);
private Logger logger = LoggerFactory.getLogger(this.getClass());
@Override
public void onResponse(Result appResponse, Invoker<?> invoker, Invocation invocation) {
......
......@@ -20,10 +20,10 @@ import java.lang.reflect.Method;
* 统一拦截异常。
* 不向消费端抛出异常,而是形成response结构
*/
@Activate(
/*@Activate(
group = {CommonConstants.PROVIDER}
)
public class MatrixResponseExceptionFilter extends ExceptionFilter implements Filter {
)*/
public class MatrixResponseExceptionFilter extends ListenableFilter {
private Logger log = LoggerFactory.getLogger(MatrixResponseExceptionFilter.class);
......@@ -32,9 +32,14 @@ public class MatrixResponseExceptionFilter extends ExceptionFilter implements Fi
}
@Override
public Result invoke(Invoker<?> invoker, Invocation invocation) throws RpcException {
return invoker.invoke(invocation);
}
static class ExceptionListener extends ProtocolExceptionHandler implements Listener {
private Logger logger = LoggerFactory.getLogger(ExceptionListener.class);
private Logger logger = LoggerFactory.getLogger(this.getClass());
private ExceptionHandlerMethodResolver resolver;
public ExceptionListener() {
......
exception=com.secoo.mall.dubbo.filter.MatrixExceptionFilter
responseException=com.secoo.mall.dubbo.filter.MatrixResponseExceptionFilter
\ No newline at end of file
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix-protocol</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......@@ -21,7 +21,7 @@
<properties>
<dubbo-starter.version>2.7.4.1</dubbo-starter.version>
<dubbo.version>2.7.4.1</dubbo.version>
<secoo-dubbo.version>2.7.4.1-secoo1.1</secoo-dubbo.version>
<secoo-dubbo.version>2.7.4.1-secoo1.4</secoo-dubbo.version>
</properties>
<dependencyManagement>
......@@ -29,27 +29,27 @@
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<!-- Aapche Dubbo -->
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -6,7 +6,7 @@
<groupId>com.secoo.mall</groupId>
<artifactId>matrix</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
<packaging>pom</packaging>
......@@ -54,108 +54,108 @@
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>logger-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>monitor-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>common-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>config-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>common-util</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>redis-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-datasource-druid</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-mybatis-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>mongodb-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>elasticsearch-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-rocketmq-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>rocketmq-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-rocketmq-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>openfeign-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-dubbo-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-protocol-web-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-core</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
<groupId>com.secoo.mall</groupId>
<artifactId>matrix-job-xxl-starter</artifactId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</dependency>
<dependency>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
......@@ -5,7 +5,7 @@
<parent>
<artifactId>matrix</artifactId>
<groupId>com.secoo.mall</groupId>
<version>1.3.1.RELEASE</version>
<version>1.3.2.RELEASE</version>
</parent>
<modelVersion>4.0.0</modelVersion>
......
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