1、静态资源访问是指系统可以直接访问的url路径
2、在Springboot中默认的静态资源路径有:classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
可以在application.properties配置文件中自定义:
#静态资源路径配置
spring.mvc.static-path-pattern=/**
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/
spring.mvc.static-path-pattern 为http请求的正则匹配规则。/**表示所有的请求
spring.resources.static-locations为文件存储位置。也可以自定义磁盘路径
#自定义的属性,指定了一个路径,注意要以/结尾 web.pic-location=D:/picture/
在spring-resources.static-locations配置加 file:${web.pic-location}
最末尾的file:${web.upload-path}中的file:表示是一个具体的硬盘路径
也可以在java文件中配置,并覆盖默认静态资源配置。