Failed to load resource: the server responded with a status of 404 ()

springboot+ssm整合从 h5页面引用其中的css样式和js样式到jsp页面中发现样式和js都不能用,也是上网查了好久,最后终于解决,先看原图

html5资源原图是这样的

Failed to load resource: the server responded with a status of 404 ()

引用后报错,其中还有css样式出现错误,就省略了

Failed to load resource: the server responded with a status of 404 ()

myeclipse中的引用样式是这样的

Failed to load resource: the server responded with a status of 404 ()

目录结构

Failed to load resource: the server responded with a status of 404 ()

问题的点在于引用的jquery以及各种css样式都是静态的,所以解析出现错误,把css样式和jQuery的js文件都放在静态资源下就可以解决这个问题,看最后的静态目录

Failed to load resource: the server responded with a status of 404 ()

其中需要注意,静态资源的文件夹的名称必须要写成static,不然不能识别,然后在静态资源下放各种js和css文件以及html和图片,希望对大家有所帮助