springboot里如何访问无阻碍静态文件
application.properties配置:
在浏览器中输入http://localhost:8080/index.html 会报一个
application.properties配置后 springboot无法直接访问resources下的static和templates下的文件,
类似与springmvc中的WEB-INF文件夹。
因为Spring boot 无法直接访问templates下的文件,
想要直接输入http://localhost:8080/index.html显示页面, 需要在src/main/下新建一个package,包名可以取名为webapp或webApp
将html文件放在里面, 然后就可以直接访问了