[springMvc]常见配置
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:aop="http://www.springframework.org/schema/aop"
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-4.0.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
<!-- 配置自动扫描的包 -->
<context:component-scan base-package="com.booway.mhsy.*"></context:component-scan>
<!-- 配置注解驱动 -->
<mvc:annotation-driven>
<!-- 配置json,支持json解析 -->
<mvc:message-converters register-defaults="true">
<bean id="fastJacksonMessageConverter" class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
<property name="supportedMediaTypes">
<list>
<value>application/json;charset=UTF-8</value>
</list>
</property>
<property name="dateFormat" value="yyyy-MM-dd HH:mm:ss"></property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<!-- 配置视图解析器 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name = "prefix" value="/WEB-INF/"></property>
<property name = "suffix" value = ".jsp"></property>
</bean>
<bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
<property name="order" value="1" /> <property name="defaultViews">
<list>
<!-- JSON View -->
<bean
class="org.springframework.web.servlet.view.json.MappingJackson2JsonView">
</bean>
</list>
</property>
</bean>
</beans>

[springMvc]常见配置  

最新文章

  1. UIAlertController警告视图和操作表单
  2. 自定义控件EditText
  3. Pig Latin
  4. 微软BI 之SSIS 系列 - 在 SQL 和 SSIS 中实现行转列的 PIVOT 透视操作
  5. canvas的代码封装
  6. JAVA_build_ant_mapper
  7. windows下搭建及配置mantis缺陷管理工具
  8. django之CSRF
  9. HTTP/2协议–特性扫盲篇
  10. [Angular] &#39;providedIn&#39; for service
  11. MySQL面试题和答案
  12. [UE4]制作视野图标
  13. 【转】CentOS 5 上安装git
  14. Cookie的Domain属性
  15. cxf soap rest webservice spring
  16. composer install 失败,无法用 unzip 解压归档、proc_open() 函数未支持
  17. 用PHP去实现数据库查询结果缓存
  18. BZOJ 2243 染色 (线段树+树链剖分)
  19. kalilinux基础
  20. Found 1 slaves: Use of uninitialized value in printf at /usr/local/percona-toolkit/bin/pt-online-schema-change line 8489

热门文章

  1. Flask使用bootstrap为HttpServer添加上传文件功能
  2. 关于非阻塞I/O、多路复用、epoll的杂谈
  3. JGit----将 Git 嵌入你的应用
  4. [leetcode] H-Index (Hash Table)
  5. shell 文本单词计数
  6. 阿里巴巴的 Kubernetes 应用管理实践经验与教训
  7. HDU1944 S-NIM(多个NIM博弈)
  8. 【CuteJavaScript】Angular6入门项目(4.改造组件和添加HTTP服务)
  9. kubernetes-单机实验(入门)
  10. LNMP-Nginx配置不记录静态文件、过期时间