Commit de4d0dd6 authored by yanzg's avatar yanzg

设置打包时可以通过GIT查看源码

parent 529f5a2f
......@@ -2,7 +2,9 @@ package com.yanzuoguang.cloud.aop;
import com.yanzuoguang.cloud.service.TokenServiceCall;
import com.yanzuoguang.token.TokenHelper;
import com.yanzuoguang.util.base.ObjectHelper;
import com.yanzuoguang.util.exception.ExceptionHelper;
import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.helper.TypeHelper;
import com.yanzuoguang.util.log.Log;
import com.yanzuoguang.util.vo.ResponseResult;
......@@ -103,8 +105,11 @@ public class WebAspect extends BaseRequestAspect {
ex = e;
result = ExceptionHelper.getError(e);
Type returnType = getReturnType(joinPoint);
if (TypeHelper.isSubType(returnType, ResponseResult.class)) {
Class returnClass = TypeHelper.getClass(returnType);
if (TypeHelper.isClass(returnClass, ResponseResult.class)) {
return result;
} else if (TypeHelper.isSubType(returnType, ResponseResult.class)) {
return JsonHelper.to(result, returnClass);
} else {
throw e;
}
......
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