Class SqlParserUtils
java.lang.Object
org.jeecgframework.minidao.sqlparser.impl.util.SqlParserUtils
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
MB_PLACEHOLDER
MyBatis占位符正则 -
MB_PREFIX
sql替换占位符前缀- See Also:
-
MB_SUFFIX
sql替换占位符后缀- See Also:
-
-
Constructor Details
-
SqlParserUtils
public SqlParserUtils()
-
-
Method Details
-
maskMyBatisPlaceholders
将 #{..}/${..} 替换为占位- Parameters:
text-tokenToRaw-- Returns:
-
maskMyBatisPlaceholders
public static String maskMyBatisPlaceholders(String text, Map<String, String> tokenToRaw, String customMaskKey) 将 #{..}/${..} 替换为占位- Parameters:
text-tokenToRaw-customMaskKey- 自定义占位符前缀- Returns:
-
restoreMyBatisPlaceholders
占位符还原:将带引号的占位换回原始 #{..}/${..}- Parameters:
sql-tokenToRaw-- Returns:
-