web.xml
<?xml version="1.0" encoding="UTF-8"?>
contextConfigLocation
classpath*:config/applicationContext.xml
org.springframework.web.context.ContextLoaderListener
encoding
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
encoding
.action
crm
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:config/springmvc-config.xml
1
crm
*.action
index.jsp
springmvc-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<context:property-placeholder location=“classpath:resource.properties”/>
<context:component-scan base-package=“com.itheima.web.controller”/>
<mvc:annotation-driven />
<mvc:resources location="/js/" mapping="/js/" />
<mvc:resources location="/css/" mapping="/css/" />
<mvc:resources location="/fonts/" mapping=“fonts/" />
<mvc:resources location="/images/" mapping="/images/” />
mvc:interceptors
mvc:interceptor
<mvc:mapping path="/**"/>
</mvc:interceptor>
</mvc:interceptors>
UserController.java