博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
关于常用的web.xml、applicationContext.xml与springMVC-servlet.xml
阅读量:6977 次
发布时间:2019-06-27

本文共 4974 字,大约阅读时间需要 16 分钟。

一、关于web.xml配置

 

这个没啥好说的,web启动需要加载的文件都扔这里。

 

 

index.html
index.htm
index.jsp
default.html
default.htm
springMVC
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
/WEB-INF/springMVC-servlet.xml
1
springMVC
/
org.springframework.web.context.ContextLoaderListener
contextConfigLocation
classpath:config/applicationContext.xml
config.file
/config.properties
encoding-filter
org.springframework.web.filter.CharacterEncodingFilter
encoding
UTF-8
forceEncoding
true
encoding-filter
/*

 

 

 

二、关于springMVC-servlet.xml配置

  springMVC-servlet这个名字是因为上面web.xml中<servlet-name>标签配的值为springMVC(<servlet-name>springMVC</servlet-name>),再加上“-servlet”后缀而形成的springMVC-servlet.xml文件名,如果改为spring,对应的文件名则为spring-servlet.xml。

 

 

application/json
text/html;charset=UTF-8
WriteMapNullValue
QuoteFieldNames
WriteDateUseDateFormat
WriteEnumUsingToString
3600
zh_CN
yyyy-MM-dd HH:mm:ss
yyyy-MM-dd
#.##
/error/500
404
400
500

 

 

 

二、关于applicationContext.xml配置

  spring的核心配置文件,也需要在web.xml加载。

 

 

转载于:https://www.cnblogs.com/Luwak90/p/9404592.html

你可能感兴趣的文章
理解MapReduce计算构架
查看>>
移动端资源集锦
查看>>
Java 吸血鬼数字
查看>>
架构设计--用户端全http參数接口具体说明v1
查看>>
Python之日期与时间处理模块(date和datetime)
查看>>
RMAN数据库恢复之丢失数据文件的恢复
查看>>
javabeans 内省 introspector BeanUtils
查看>>
跑马灯效果的TextView之singLine 和maxLines
查看>>
(转载)oracle字符集理解
查看>>
《红黑树》学习心得
查看>>
高斯消元
查看>>
2017年寒假作业(一)
查看>>
Could not find a matching subscription for the message.
查看>>
Python开发【项目】:选课系统
查看>>
如果用 索引的话,这个太不方便了,草,
查看>>
java 返回年月的第一天 和最后一天【转载】
查看>>
python--django模板(model)
查看>>
ntp的中级知识
查看>>
ObjectCache 的使用
查看>>
centos6.2下kdump学习总结
查看>>