<?xml version = "1.0" encoding = "UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/context/spring-mvc.xsd
">
<!-- scan all the packages to identify all the controller -->
<context:component-scan
base-package="net.aymwus.onlineshopping.controller" />
<!-- configure the InternalResource View Resolver -->
<bean id="viewResolver" class="InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/views/" />
<property name="suffix" value=".jsp"></property>
</bean>
<!-- load static resource -->
<mvc:annotation-driven />
<mvc:resource location="/assets/" mapping="/resource/**" />
</beans>
当我尝试加载静态资源并定义这些资源时
mvc:注释驱动
我遇到此错误。好吧,我想加载我的静态资源,但我无法这样做。任何人都可以解释如何解决此问题吗?