修改jeesite默认文件上传路径的方法

修改tomcat文件上传路径

tomcat–>>conf文件夹—>>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
             Note: The pattern used is equivalent to using pattern="common" -->
        <Valve className="org.apache.catalina.valves.AccessLogValve" directory="logs"
               prefix="localhost_access_log" suffix=".txt"
               pattern="%h %l %u %t &quot;%r&quot; %s %b" />
			   
		<!--配置文件上传的路径-->	   
		<Context path="/userFiles/file" docBase="E:userFiles"></Context>
</Host>

修改properties中的basedir为 userfiles.basedir=E:/userFiles

经验分享 程序员 微信小程序 职场和发展