spring boot 访问 static public 目录下的静态资源报404解决办法 1.前提是你没有修改spring boot 默认拦截路径,跟默认访问资源的目录。 在idea 设置中 把 compiler 下的 Buid project automatically 勾选上