1:先配置文件上传时Tomcat的虚拟路径
system.file.read.location=http://localhost:8080/fileserversavepath/ 这是访问图片的地址
system.file.write.location=D\:/static_files/fileserversavepath/ 这是Tomcat下临时存储文件的虚拟路径
2:接着要找到存储图片的服务器,找到server.xml配置映射路径(红色区域就是添加的配置)
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true">
<!-- SingleSignOn valve, share authentication between web applications
Documentation at: /docs/config/valve.html -->
<!--
<Valve className="org.apache.catalina.authenticator.SingleSignOn" />
-->
<!-- Access log processes all example.
Documentation at: /docs/config/valve.html