springboot jar部署时文件路径问题 ueditor 富文本编辑器的目录

打成jar部署后,上传文件找不到正确的文件路径,由于jar 不像 tomcat 那种有明确的文件路径web

1.application.properties 添加以下一段话spring

#上传文件大小限制
spring.servlet.multipart.max-file-size=500MB
spring.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

修改配置url

plugins\ueditor\jsp\controller.jspspa

在     rootPath = rootPath + "/";  下面.net

加上一句  rootPath = "H:/"ip

相关文章
相关标签/搜索