【发布时间】:2012-02-29 23:01:00
【问题描述】:
我很难将图像上传到公用文件夹。公用文件夹是 Webapp 文件夹内的 WEB-INF 的兄弟。
尝试像
this.getClass().getResource("/images/16x16").toString() 返回空指针异常。
我已将图片文件夹添加为资源
<mvc:resources mapping="/images/**" location="/public/images/" />
有没有办法做到这一点?感谢您阅读本文
【问题讨论】:
标签: jakarta-ee web-applications tomcat spring-mvc document-root