本文共 405 字,大约阅读时间需要 1 分钟。
src/main/java
:项目代码
src/main/resources
:静态资源 resources/static
:存放静态资源文件,比如css、js、image
resources/templates
:存放静态页面,比如jsp、html resources/application.properties
:Springboot配置文件 加载静态资源文件时,Springboot会挨个从META/resources
>resources
>static
>public
文件夹里面找是否存在相应的资源,如果有则直接返回。这四个文件路径是Springboot设定的默认路径,如果静态资源在其他路径下,则需要修改配置。
Springboot的默认配置:
spring.resources.static-locations = classpath
转载地址:http://aheaf.baihongyu.com/