添加 TenantIdUtil 方便在非 web 场景使用

This commit is contained in:
卢春梦 2024-04-29 16:38:24 +08:00
parent 8286b9f6ea
commit 78dea9b212
2 changed files with 3 additions and 1 deletions

View File

@ -15,6 +15,7 @@
*/ */
package org.springblade.core.boot.tenant; package org.springblade.core.boot.tenant;
import lombok.experimental.UtilityClass;
import org.springblade.core.secure.utils.SecureUtil; import org.springblade.core.secure.utils.SecureUtil;
import org.springframework.util.Assert; import org.springframework.util.Assert;
@ -25,6 +26,7 @@ import java.util.function.Supplier;
* *
* @author L.cm * @author L.cm
*/ */
@UtilityClass
public class TenantIdUtil { public class TenantIdUtil {
private static final ThreadLocal<String> tl = new ThreadLocal<>(); private static final ThreadLocal<String> tl = new ThreadLocal<>();

View File

@ -158,7 +158,7 @@ public class SqlKeyword {
* @param param 关键字 * @param param 关键字
* @return boolean * @return boolean
*/ */
public static Boolean match(String param) { public static boolean match(String param) {
return Func.isNotEmpty(param) && PATTERN.matcher(param).find(); return Func.isNotEmpty(param) && PATTERN.matcher(param).find();
} }