springboot集成themeleaf报Namespace 'th' is not bound问题的解决

问题描述

在我们想要在html前端页面使用th:符号时,发现他一直报错

问题解决

在html标签的最上方,也就是这里:

加上这样一句代码:(加在html标签里面!!!)

 xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"

这样就能够解决这个问题啦!

posted @ 2023-05-29 21:47  yesyes1  阅读(165)  评论(0)    收藏  举报