本文共 451 字,大约阅读时间需要 1 分钟。
request.getSession().getServletContext().getRealPath("/")
获取以该类为基准的绝对路径,可以循环/截取保留自己所需要的部分
当前类.class.getResource( "/" ).toURI().getPath();
当前类.class.getResource( "/" ).getPath();
String path = System.getProperty("user.dir")
随笔记录,只为方便自己学习
2018-11-15 Chenyb
转载地址:http://rjyaz.baihongyu.com/