开启 Dubbo Consumer 参数校验
This commit is contained in:
@@ -51,7 +51,7 @@ public class GlobalExceptionHandler {
|
||||
private String applicationName;
|
||||
|
||||
// TODO 目前存在一个问题,如果未引入 system-rpc-api 依赖,GlobalExceptionHandler 会报类不存在。未来封装出 Repository 解决该问题
|
||||
@Reference(validation = "true", version = "${dubbo.consumer.SystemExceptionLogRpc.version}")
|
||||
@Reference(version = "${dubbo.consumer.SystemExceptionLogRpc.version}")
|
||||
private SystemExceptionLogRpc systemExceptionLogRpc;
|
||||
|
||||
/**
|
||||
@@ -199,6 +199,7 @@ public class GlobalExceptionHandler {
|
||||
.setExceptionTime(new Date());
|
||||
}
|
||||
|
||||
// TODO 优化点:后续可以增加事件
|
||||
@Async
|
||||
public void addExceptionLog(SystemExceptionLogCreateDTO exceptionLog) {
|
||||
try {
|
||||
|
||||
@@ -26,7 +26,7 @@ public class AccessLogInterceptor extends HandlerInterceptorAdapter {
|
||||
|
||||
private Logger logger = LoggerFactory.getLogger(getClass());
|
||||
|
||||
@Reference(validation = "false", version = "${dubbo.consumer.SystemAccessLogRpc.version}")
|
||||
@Reference(version = "${dubbo.consumer.SystemAccessLogRpc.version}")
|
||||
private SystemAccessLogRpc systemAccessLogRpc;
|
||||
|
||||
@Value("${spring.application.name}")
|
||||
@@ -77,6 +77,7 @@ public class AccessLogInterceptor extends HandlerInterceptorAdapter {
|
||||
.setResponseTime((int) (System.currentTimeMillis() - accessLog.getStartTime().getTime())); // 默认响应时间设为 0
|
||||
}
|
||||
|
||||
// TODO 优化点:后续可以增加事件
|
||||
@Async // 异步入库
|
||||
public void addAccessLog(SystemAccessLogCreateDTO accessLog) {
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user