SpringBoot HTML 报错404
来源:互联网 发布:adobe cc 2017 mac 编辑:程序博客网 时间:2024/06/06 01:47
问题描述
使用了SpringBoot-1.5.6建了个项目,所有配置按照老版本(其实就是没有配置,因为自动配置嘛),依赖了thymeleaf-starter。访问页面老是报404。换回老版本SpringBoot-1.3.3,就可以访问。定位问题
启用debugger日志:logging.lever.org.springframework.web=debuger,查看debuger信息
#1.3.3成功信息:...2017-09-12 13:32:03.982 DEBUG 44556 --- [io-19000-exec-1] o.s.w.s.v.ContentNegotiatingViewResolver : Returning [org.thymeleaf.spring4.view.ThymeleafView@71df5a49] based on requested media type 'text/html'2017-09-12 13:32:03.982 DEBUG 44556 --- [io-19000-exec-1] o.s.web.servlet.DispatcherServlet : Rendering view [org.thymeleaf.spring4.view.ThymeleafView@71df5a49] in DispatcherServlet with name 'dispatcherServlet'2017-09-12 13:32:04.041 DEBUG 44556 --- [io-19000-exec-1] o.s.web.servlet.DispatcherServlet : Successfully completed request#1.5.6失败信息:...2017-09-12 13:35:57.942 DEBUG 44559 --- [io-19000-exec-1] o.s.web.servlet.DispatcherServlet : Null ModelAndView returned to DispatcherServlet with name 'dispatcherServlet': assuming HandlerAdapter completed request handling2017-09-12 13:35:57.942 DEBUG 44559 --- [io-19000-exec-1] o.s.web.servlet.DispatcherServlet : Successfully completed request
可以看到1.5.6(依赖thymeleaf-spring-2.1.5)并没有找到视图解析类ThymeleafView.class。没有我创建一个不行啊,去写的时候发现,classpath中根本没有ThymeleafView这个类。
切换到1.3.3(依赖thymeleaf-spring-2.1.4)又有这个类。。。
Eclipse直接定位到该类,尽然发现
mmp,cd到相应文件夹,把本地maven库中的相关jar包(thymeleaf文件夹)删除,重新下载,搞定(只要jar下载不出错)
阅读全文
0 0
- SpringBoot HTML 报错404
- 启动springboot报错
- eclipse中springboot报错
- 新建SpringBoot eclipse 报错
- springBoot整合logback报错
- springboot跳转页面报错
- Springboot 启动CallCenterApplication报错
- SpringBoot报错Whitelabel Error Page
- Springboot+Ebean配置Mysql数据源报错
- springboot项目第一次启动报错
- springboot项目连接mysql数据库报错
- springboot 集成webservice客户端调用报错
- 使用Springboot的报错问题
- SpringBoot报错(十) WARN:ationConfigEmbeddedWebApplicationContext
- SpringBoot报错(六)热部署报错
- SpringBoot报错(八)返回页面报错
- SpringBoot报错(九)配置Mybatis报错
- fck_docprops.html报错解决
- C#梳理【类的继承和Interface接口】
- javac -home不是内部或外部命令
- warning LNK4099: PDB 原因及解决方案
- 面向对象
- Hibernate中一对多关联关系保存
- SpringBoot HTML 报错404
- 系统学习深度学习(三十八)--CRAFT
- Fastjson 介绍和使用
- 深度优先搜索——神奇的矩环
- Display Abnormal When booting
- 构造函数
- MySQL——修改root密码的4种方法(以windows为例)
- 09:向量点积计算
- JS IF 作用域