springboot中引入静态资源路径问题Failed to load resource: the server responded with a status of 404 ()

错误如下:

原因:路径问题

解决办法:

**静态资源的的当前路径是在static下,springboot是约定高于配置,约定静态资源的当前路径在static下,所以开始路径为static的下级开始即可

如:

猜你喜欢

转载自blog.csdn.net/caidingnu/article/details/86391331