打成jar部署後,上傳文件找不到正確的文件路徑,由於jar 不像 tomcat 那種有明確的文件路徑web
1.application.properties 添加以下一段話spring
#上傳文件大小限制spring.servlet.multipart.max-file-size=500MBspring.servlet.multipart.max-request-size=500MB#jar包部署時去掉註釋 www.1b23.com#web.upload-path=h:/#web.front-path=h:/#spring.resources.static-locations=file:${web.upload-path},file:${web.front-path}
這裏以 h 盤爲例,也能夠是 d 盤,根據狀況而定tomcat
2. 把 uploadFiles 拷貝到 H 盤目錄下 (uploadFiles 是上傳文件的目錄,這個也根據本身的詳情狀況)app
這樣上傳文件,都上傳到H盤下的 uploadFiles 目錄裏面去了jsp
3. 若是是 ueditor 文件目錄,ueditor 所有拷貝到硬盤中,好比H 盤ide
修改配置spa
plugins\ueditor\jsp\controller.jsporm
在 rootPath = rootPath + "/"; 下面ip
加上一句 rootPath = "H:/"; 部署