Thymeleaf中如何判断字符串是否包含或者不包含某个子串?-sunziren

  1.A中是否包含B:

  th:if="${#string.contains(A,B)}"

  2.A中是否不包含B:

  th:if="${!#string.contains(A,B)}"

  

posted @ 2021-02-22 09:57  sunziren  阅读(3802)  评论(2编辑  收藏  举报