-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: 添加操作日志是否忽略支持记录当前参数配置;登录接口记录操作日志用户认证信息 #280
Conversation
...ic/src/main/java/org/hswebframework/web/authorization/basic/web/AuthorizationController.java
Show resolved
Hide resolved
* @return 忽略记载方法的请求参数 | ||
* <p>如果不想记录方法全部或某些参数,则可以配置返回*或者对应参数名(多个用逗号分割)</p> | ||
*/ | ||
String ignoreParameter() default ""; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
建议使用数组,并且支持 * 进行通配。
@@ -121,6 +123,25 @@ private Mono<Map<String, Object>> doLogin(Mono<Map<String, Object>> parameter) { | |||
}); | |||
} | |||
|
|||
@EventListener | |||
public void fillLoggerInfoAuth(AuthorizationSuccessEvent event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
单独写一个类来处理此事件
.stream() | ||
.anyMatch(loggerParser -> loggerParser.ignoreParameter(holder).test(parameter)); | ||
|
||
return holder |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
使用Maps.filter...
来处理。减少Map对象的创建。
No description provided.