Thymeleaf页面Attribute th:fragment is not allowed here错误的解决方法

问题描述

博主今天的编写Thymeleaf页面的时候发现标签失效了 怎么调也调不好
在这里插入图片描述

解决方法

博主的解决方法是 把第二行引入Thymeleaf的引入代码从

<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">

换成了

<html xmlns:th="http://www.thymeleaf.org" lang="en">

换完之后警告就消失了

发布了28 篇原创文章 · 获赞 11 · 访问量 6597

猜你喜欢

转载自blog.csdn.net/zhanxiaozhangA/article/details/103824445
今日推荐