spring:
mvc:
static-path-pattern: /img/**
web:
resources:
static-locations: classpath:/resources/upload/
用上面的方式访问静态资源,面对新上传的文件,会访问不到,需要重启
解决方案
spring:
web:
resources:
static-locations: file:${web.pic-path}
web:
pic-path: D:/*****/src/main/resources/upload/