Skip to content

Commit 27423b4

Browse files
author
hocgin
committed
允许动态忽略租户
1 parent de8f365 commit 27423b4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-boot-utils/utils-base/src/main/java/in/hocg/boot/utils/context/UserContextHolder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ public static void setIgnoreTenant(Boolean ignore) {
3030
}
3131

3232
public static Optional<? extends UserDetail> getUserDetail() {
33-
return Optional.of(USER_DETAIL.get());
33+
return Optional.ofNullable(USER_DETAIL.get());
3434
}
3535

3636
public static <T extends UserDetail> void setUserDetail(T userDetail) {

0 commit comments

Comments
 (0)