mirror of
https://github.com/chillzhuang/blade-tool
synced 2024-11-15 06:59:29 +08:00
✨ 添加 TenantIdUtil 方便在非 web 场景使用
This commit is contained in:
parent
8286b9f6ea
commit
78dea9b212
@ -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<>();
|
||||||
|
|
||||||
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user