静态资源过滤 静态资源放在resources\static下浏览器可以直接访问resources\templates下的文件不能直接访问,只能通过controller跳转 设置首页 springboot默认首页为 静态资源地址 + index.html //"classpath:/META-INF/resources/", //"classpath:/resources/", //"classpath:/static/", //"classpath:/public/" location + "index.html" 所以我们在resources\static下新建一个index.html即可