Idea引入thymeleaf失败解决方法

简介: Idea引入thymeleaf失败解决方法

报错

Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
 
Fri Sep 29 09:42:00 CST 2023
There was an unexpected error (type=Not Found, status=404).


原因:html没有使用thymeleaf


首先要引入:

xmlns:th=“http://www.thymeleaf.org”

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


如果不行


在setting–>plugins–>搜索thymeleaf

会出来个插件,下载,应用


最后,如果还有问题


类似与这样 显示为灰色



那就是在写的代码有问题


上图正确的应该是:

<h1 th:text="${city}"></h1>


目录
打赏
0
0
0
0
112
分享
相关文章
|
9月前
|
idea中关于java的图形化界面编程awt_container容器中Button(按钮)上汉字是乱码或者小方框的解决方法
idea中关于java的图形化界面编程awt_container容器中Button(按钮)上汉字是乱码或者小方框的解决方法
146 0
idea 从mapper方法直接点进xml文件的解决方法
idea 从mapper方法直接点进xml文件的解决方法
788 2
|
7月前
|
idea启动java服务报错OutOfMemoryError: GC overhead limit exceeded解决方法
idea启动java服务报错OutOfMemoryError: GC overhead limit exceeded解决方法
1338 0
|
9月前
thymeleaf在IDEA中无故报错
thymeleaf在IDEA中无故报错
|
9月前
idea创建Package时出现包名累加,而不是树形结构解决方法
idea创建Package时出现包名累加,而不是树形结构解决方法
120 0
IDEA DataGrip连接sqlserver 提示驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接的解决方法
IDEA DataGrip连接sqlserver 提示驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接的解决方法
794 0
IDEA 中 project窗口,不显示项目工程目录,解决方法
IDEA 中 project窗口,不显示项目工程目录,解决方法
Mac中IntelliJ IDEA每次打开立刻“意外退出”的解决方法
Mac中IntelliJ IDEA每次打开立刻“意外退出”的解决方法
449 1

热门文章

最新文章

AI助理

你好,我是AI助理

可以解答问题、推荐解决方案等