path = new File(ResourceUtils.getURL("classpath:").getPath());
File uploadPath = new File(path.getAbsolutePath(), "static/tmp/");
成功!
文章标签 javaee获取路径 文章分类 Java 后端开发
path = new File(ResourceUtils.getURL("classpath:").getPath());
File uploadPath = new File(path.getAbsolutePath(), "static/tmp/");
成功!
JavaEE 保存文件获取绝对路径getResource("")和servletContext.getRealPath("/")
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M