Spring 视图层如何显示验证消息提示

1.示例

<p th:if="${#fields.hasErrors('name')}" th:errors="*{name}" ></p>

  关键代码${#fields.hasErrors('name')}

       name为提示所对应的变量

原文地址:https://www.cnblogs.com/max-hou/p/11104678.html