提交 4eb805c7 编写于 作者: L lbw

🎨 Improving structure / format of the code.

上级 d609e508
......@@ -55,7 +55,8 @@ public class SysLogAspect {
EvaluationContext context = SysLogUtils.getContext(point.getArgs(), signature.getMethod());
try {
value = SysLogUtils.getValue(context, expression, String.class);
} catch (Exception e) {
}
catch (Exception e) {
// SPEL 表达式异常,获取 value 的值
log.error("@SysLog 解析SPEL {} 异常", expression);
}
......
......@@ -98,11 +98,10 @@ public class SysLogUtils {
/**
* 获取spel 定义的参数值
*
* @param context 参数容器
* @param key key
* @param clazz 需要返回的类型
* @param <T> 返回泛型
* @param key key
* @param clazz 需要返回的类型
* @param <T> 返回泛型
* @return 参数值
*/
public <T> T getValue(EvaluationContext context, String key, Class<T> clazz) {
......@@ -113,8 +112,7 @@ public class SysLogUtils {
/**
* 获取参数容器
*
* @param arguments 方法的参数列表
* @param arguments 方法的参数列表
* @param signatureMethod 被执行的方法体
* @return 装载参数的容器
*/
......@@ -129,4 +127,5 @@ public class SysLogUtils {
}
return context;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册