Commit 90d10abb authored by yanzg's avatar yanzg

接口文档的支持

parent 0b6ef8a5
...@@ -33,6 +33,9 @@ public class BaseRequestAspect implements ThreadNext.Next { ...@@ -33,6 +33,9 @@ public class BaseRequestAspect implements ThreadNext.Next {
@Value("${spring.application.name}") @Value("${spring.application.name}")
protected String applicationName; protected String applicationName;
@Value("${yzg.logCommon:true}")
protected boolean logCommon = true;
@Value("${yzg.logAll:false}") @Value("${yzg.logAll:false}")
protected boolean logAll = false; protected boolean logAll = false;
...@@ -116,6 +119,7 @@ public class BaseRequestAspect implements ThreadNext.Next { ...@@ -116,6 +119,7 @@ public class BaseRequestAspect implements ThreadNext.Next {
/** /**
* 获取数据参数 * 获取数据参数
*
* @param args * @param args
* @return * @return
*/ */
...@@ -203,7 +207,7 @@ public class BaseRequestAspect implements ThreadNext.Next { ...@@ -203,7 +207,7 @@ public class BaseRequestAspect implements ThreadNext.Next {
Log.error(joinPoint.getSignature().getDeclaringType(), resultEx, "%s [ %s ] time %d ms, result: %s", Log.error(joinPoint.getSignature().getDeclaringType(), resultEx, "%s [ %s ] time %d ms, result: %s",
tag, name, time, getMaxString(JsonHelper.serialize(responseResult))); tag, name, time, getMaxString(JsonHelper.serialize(responseResult)));
resultEx.printStackTrace(); resultEx.printStackTrace();
} else { } else if (logCommon) {
Log.info(joinPoint.getSignature().getDeclaringType(), "%s [ %s ] time %d ms, result: %s", Log.info(joinPoint.getSignature().getDeclaringType(), "%s [ %s ] time %d ms, result: %s",
tag, name, time, getMaxString(JsonHelper.serialize(responseResult))); tag, name, time, getMaxString(JsonHelper.serialize(responseResult)));
} }
......
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