我正在做一个springmvc项目,一切正常,但当我在我的项目中添加外部模板,然后索引。jsp没有访问模板css,图片,字体等,请任何人帮我。下面我给出了所需的五和一些截图[图像包含我的项目目录][1] [1]: https://i.stack.imgur.com/ts5Jf.png
```
web.xml:-
<servlet>
<servlet-name>spring</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>spring</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
spring-servlet.xml:-
<context:component-scan
base-package="com.control"></context:component-scan>
<mvc:annotation-driven />
<bean id="vr"
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver" />
<mvc:resources mapping="/test/**" location="/test/" />
暂无答案!
目前还没有任何答案,快来回答吧!