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

springboot中引入bootstrap的静态资源路径问题Failed to load resource: the server responded with a status of 404 ()
错误为无法加载css和js资源。
springboot中引入bootstrap的静态资源路径问题Failed to load resource: the server responded with a status of 404 ()
问题出在划红线的地方。静态资源的的当前路径是在static下,springboot是约定高于配置,约定静态资源的当前路径在static下,所以开始路径为static的下级开始即可。在SpringBoot中,约定大于配置可以从以下两个方面来理解:
1.开发人员仅需规定应用中不符合约定的部分。
2.在没有规定配置的地方,采用默认配置,以力求最简配置为核心思想。
约定静态资源的当前路径在static下,所以开始路径为static的下级开始即可。所以应该去掉…/static