Thymeleaf 取后端值是显示??a_zh_CN??
后端传值:
model.addAttribute("a", 123);
前端取值:
<!--错误写法: <h3 class="red-txt" th:text="#{a}"></h3> -->
<h3 class="red-txt" th:text="${a}"></h3>
#是用于取配置文件中的值的,去后端值要使用$
Thymeleaf 取后端值是显示??a_zh_CN??
后端传值:
model.addAttribute("a", 123);
前端取值:
<!--错误写法: <h3 class="red-txt" th:text="#{a}"></h3> -->
<h3 class="red-txt" th:text="${a}"></h3>
#是用于取配置文件中的值的,去后端值要使用$