解决:springboot访问static 404

2022-04-20 1563

springboot 遇到不能访问静态资源的情况


首先springboot 是默认访问static的 引用JS CSS 路径不需要带上static

如果8080直接访问静态资源 404


This application has no explicit mapping for /error, so you are seeing this as a fallback.

出现这种错误 访问controller一般是没问题的 是静态资源没有加载到tomcat中


看了其他帖子有说在properties中配置路径的 其实现在springboot不需要特地配置 默认映射到static了


把Build project automatically这个勾上

北京乐逍遥网站设计有限公司,乐逍遥网站设计,乐逍遥建站,解决:springboot访问static 404,常见的springboot错误,常见的springboot遇到的问题, springboot 错误消息, springboot常见的异常,springboot常见大坑, springboot常见报错信息,springboot开发常见问题

以上就是解决:springboot访问static 404的详细内容,更多请关注php知识-学习天地 www.lxywzjs.com其它相关文章!

分享至:

分享到QQ空间 分享到朋友社区 新浪微博分享

栏目地图