springboot加载本地目录

摘要 

属于 :API 标签: 发布于:2021-07-20 21:16:24
spring.servlet.multipart.location=e:/upload
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/, classpath:/static/, classpath:/public/, file:${spring.servlet.multipart.location}


如 upload下有a.jpg

则访问 http://localhost:port/a.jpg