我的资源映射存在奇怪的问题。
dispatcher-servlet.xml
<mvc:annotation-driven />
<mvc:resources mapping="/js/**" location="/WEB-INF/resources/js/" />
<mvc:resources mapping="/css/**" location="/WEB-INF/resources/css/" />
<mvc:resources mapping="/img/**" location="/WEB-INF/resources/img/" />
对于映射,例如视图中的jquery.js,我添加了:
<script src="<c:url value="/js/jquery.min.js" />" type="text/javascript"></script>
这是有效的,但是当我添加子目录时,例如:
<script src="<c:url value="/js/tiny_mce/tiny_mce.js" />" type="text/javascript"></script>
返回:No mapping found for HTTP request with URI [/xxx/resources/js/tiny_mce/tiny_mce.js] in DispatcherServlet with name 'dispatcher'
我有来自Chrome元素的错误404。
怎么了?