From d4f01dcbc6aa9cb8aef5f66290d286ed0199fb8b Mon Sep 17 00:00:00 2001 From: zhouhao Date: Sat, 27 Sep 2025 12:08:25 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BC=98=E5=8C=96=E7=94=A8?= =?UTF-8?q?=E6=88=B7=E6=9D=83=E9=99=90=E5=8F=98=E6=9B=B4=E4=BA=8B=E4=BB=B6?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/event/ClearUserAuthorizationCacheEvent.java | 5 +++++ .../service/DefaultReactiveAuthenticationManager.java | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/event/ClearUserAuthorizationCacheEvent.java b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/event/ClearUserAuthorizationCacheEvent.java index 78981df02..1f5b1eeae 100644 --- a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/event/ClearUserAuthorizationCacheEvent.java +++ b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-api/src/main/java/org/hswebframework/web/system/authorization/api/event/ClearUserAuthorizationCacheEvent.java @@ -50,6 +50,11 @@ public class ClearUserAuthorizationCacheEvent extends DefaultAsyncEvent { super.async(doOnEnabled(Mono.fromDirect(publisher).then())); } + @Override + public synchronized void first(Publisher publisher) { + super.first(doOnEnabled(Mono.fromDirect(publisher).then())); + } + public static ClearUserAuthorizationCacheEvent of(Collection collection) { ClearUserAuthorizationCacheEvent event = new ClearUserAuthorizationCacheEvent(); if (collection == null || collection.isEmpty()) { diff --git a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationManager.java b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationManager.java index 9d5d64955..21dd2f350 100644 --- a/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationManager.java +++ b/hsweb-system/hsweb-system-authorization/hsweb-system-authorization-default/src/main/java/org/hswebframework/web/system/authorization/defaults/service/DefaultReactiveAuthenticationManager.java @@ -43,7 +43,7 @@ public class DefaultReactiveAuthenticationManager implements ReactiveAuthenticat .getCache("user-auth") .evictAll(event.getUserId()) .doOnError(err -> log.error(err.getMessage(), err)) - .doOnSuccess(__ -> log.info("clear user {} authentication cache success", event.getUserId())); + .doOnSuccess(__ -> log.debug("clear user {} authentication cache success", event.getUserId())); } if (event.isAsync()) { event.first(operator);