Spring的web.xml文件配置
2020-12-13 02:25
标签:定义 容器 全局 context 分发 org init filter prefix Spring的web.xml文件配置 标签:定义 容器 全局 context 分发 org init filter prefix 原文地址:https://www.cnblogs.com/fcitx/p/11037549.html
context-param>
param-name>contextConfigLocationparam-name>
param-value>classpath:spring/spring-base.xmlparam-value>
context-param>
listener>
listener-class>
org.springframework.web.context.ContextLoaderListener
listener-class>
listener>
servlet>
servlet-name>SpringMVCServletservlet-name>
servlet-class>
org.springframework.web.servlet.DispatcherServlet
servlet-class>
init-param>
param-name>contextConfigLocationparam-name>
param-value>classpath:spring/spring-mvc.xmlparam-value>
init-param>
servlet>
servlet-mapping>
servlet-name>SpringMVCServletservlet-name>
url-pattern>*.actionurl-pattern>
servlet-mapping>
filter>
filter-name>EncodingFitlerfilter-name>
filter-class>
org.springframework.web.filter.CharacterEncodingFilter
filter-class>
init-param>
param-name>encodingparam-name>
param-value>UTF-8param-value>
init-param>
filter>
filter-mapping>
filter-name>EncodingFitlerfilter-name>
url-pattern>/*url-pattern>
filter-mapping>
配置action扫描路径
上一篇:转-永远的麦子-JSON