Spring Boot之配置虚拟映射路径
2017-11-07 17:36
567 查看
需要先在
然后将本地上传文件的路径加入到静态资源路径中即可:
最后访问本地media路径下的文件img.png:
以上
application.properties属性文件中配置本地上传文件的路径:
spring.http.multipart.location=D:/crowd-funding/media/
然后将本地上传文件的路径加入到静态资源路径中即可:
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/, classpath:/static/, classpath:/public/, file:${spring.http.multipart.location}
最后访问本地media路径下的文件img.png:
http://localhost:8080/img.png
以上
相关文章推荐
- Spring Boot配置虚拟路径
- SpringBoot 配置图片虚拟路径
- Springboot配置静态资源url映射及对应的本地路径
- SpringBoot设置虚拟路径映射绝对路径
- springboot项目实现静态文件映射任意路径
- springBoot配置路径
- spring-boot 加载本地静态资源文件路径配置
- spring-boot 加载本地静态资源文件路径配置
- Tomcat 配置虚拟路径映射
- tomcat配置虚拟映射路径
- Springboot 静态资源路径配置的两种方法
- 百度UEditor 上传组件 使用虚拟路径映射配置
- apache虚拟路径映射配置和中文路径的解决
- spring-boot 加载本地静态资源文件路径配置
- Spring boot 默认静态资源路径与手动配置访问路径的方法
- spring-boot 加载本地静态资源文件路径配置
- spring-boot 加载本地静态资源文件路径配置
- SpringBoot 使用注解将配置文件自动映射到属性和实体类
- Springboot 之 静态资源路径配置
- SpringBoot系列<四>视图解析、路径-资源映射、静态资源访问