Commit 2d969b43 authored by ZhengJie's avatar ZhengJie
Browse files

[代码完善](v2.5): v2.5 beta 审计获取当前操作人优化

2.5 Beta 详情:https://www.ydyno.com/archives/1225.html
parent 90a4a80a
......@@ -35,7 +35,11 @@ public class AuditorConfig implements AuditorAware<String> {
*/
@Override
public Optional<String> getCurrentAuditor() {
// 这里应根据实际业务情况获取具体信息
return Optional.of(SecurityUtils.getCurrentUsername());
try {
// 这里应根据实际业务情况获取具体信息
return Optional.of(SecurityUtils.getCurrentUsername());
}catch (Exception ignored){}
// 用户定时任务,或者无Token调用的情况
return Optional.of("System");
}
}
Supports Markdown
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