spring boot 上线易见问题
2019-05-29 本文已影响0人
我不说你不懂_f0c6
linux 服务器,经常过段时间不能上传图片
添加设置临时目录( -Djava.io.tmpdir=/usr/fire/ )
nohup java -jar -Djava.io.tmpdir=/usr/fire/ -Dfile.encoding=utf-8 -Dloader.path=.,resources,lib gostfire.jar
在windows服务器上线,用
request.getSession().getServletContext().getRealPath("/");
只能获取临时目录解决办法
在jar 同级目录建立 public文件夹或者static文件夹,就能定位到真实目录而不思
虚拟目录c盘 temp:
设置远程调试

复制 启动设置参数
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=5005

点击debug就可以调试远程的代码了
