Springboot+thymeleaf出现(type=Not Found, status=404)错误
程序员文章站
2022-05-31 21:41:53
...
错误描述
1、使用Idea新建一个springboot项目,运行后出现如下错误:
解决办法
- 新建项目时是否添加了thymeleaf矿建,如果未添加,添加如下:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
- 确认目录结构是否正确,这种目录结构controller和application是错误的
目录结构应该是下面这个样子
- 个人认为url写错不至于会出现
- 有些人添加了如下依赖,我认为了,测试了发现没软用,或许解决了ecplise软件中搭建springboot项目的问题
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>
推荐阅读
-
thymeleaf 404报错:There was anunexpected error (type=Not Found, status=404).
-
spring boot jst 模板报404 There was an unexpected error (type=Not Found, status=404).
-
There was an unexpected error (type=Not Found, status=404)---采用layui出现的问题
-
idea:springboot整合jsp出现的错误:There was an unexpected error (type=Not Found, status=404). /WEB-INF/jsp。。
-
springboot中unexpected error (type=Not Found, status=404)/WEB-INF/upload.jsp和No message available解决方案
-
Springboot+thymeleaf出现(type=Not Found, status=404)错误
-
SpringCloud版本引发的type=Not Found, status=404
-
Whitelabel Error Page There was an unexpected error (type=Not Found, status=404). No message availab
-
浏览器请求spring-boot模块项目报:There was an unexpected error (type=Not Found, status=404).
-
springboot集成jsp,There was an unexpected error (type=Not Found, status=404). No message available