Thymeleaf - How to compare string with request parameter in html in Thymeleaf tag “th:if”?

前端 未结 2 451
鱼传尺愫
鱼传尺愫 2021-02-01 08:36

How to compare string with request parameter in html in Thymeleaf tag \"th:if\" ? right now i am using this

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-02-01 08:54

    With Thymeleaf 3, I normally use #request (a short form of #httpservletrequest) and #strings.equals() for that, which will look like this:

提交回复
热议问题