if (tableMap.get(Constants.OTHER_DEVICE_NAME) != null) {
String otherDevoceName = "%" + tableMap.get(Constants.OTHER_DEVICE_NAME).replace("/", "\\/")
.replaceAll("_", "\\\\_").replaceAll("%", "\\\\%") + "%";
predicates.add(cb.like(root.get(Constants.OTHER_DEVICE_NAME), otherDevoceName));
}
java后端Specification工具模糊搜索,校验/ %等特殊符号
最新推荐文章于 2023-09-15 11:00:42 发布