1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context-4.2.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop-4.2.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc-4.2.xsd">
- <mvc:default-servlet-handler/>
- <mvc:annotation-driven>
- <mvc:message-converters register-defaults="true">
- <bean class="com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter">
- <property name="supportedMediaTypes">
- <list>
- <value>text/html;charset=UTF-8</value>
- <value>application/json;charset=UTF-8</value>
- </list>
- </property>
- <property name="features">
- <list>
- <value>WriteMapNullValue</value>
- <value>QuoteFieldNames</value>
- <value>WriteDateUseDateFormat</value>
- <!-- 禁用fastjson循环引用检测 -->
- <value>DisableCircularReferenceDetect</value>
- </list>
- </property>
- </bean>
- </mvc:message-converters>
- </mvc:annotation-driven>
- <!-- Velocity视图解析器 默认视图 -->
- <bean id="velocityViewResolver" class="org.springframework.web.servlet.view.velocity.VelocityViewResolver">
- <property name="contentType" value="text/html;charset=UTF-8"/>
- <property name="viewNames" value="*.html"/>
- <property name="suffix" value=""/>
- <property name="dateToolAttribute" value="date"/>
- <property name="numberToolAttribute" value="number"/>
- <property name="toolboxConfigLocation" value="/WEB-INF/velocity-toolbox.xml"/>
- <!--是否使用spring对宏定义的支持-->
- <property name="exposeRequestAttributes" value="true"/>
- <property name="requestContextAttribute" value="rc"/>
- <property name="order" value="0"/>
- </bean>
- <bean id="velocityConfigurer" class="org.springframework.web.servlet.view.velocity.VelocityConfigurer">
- <property name="resourceLoaderPath" value="/WEB-INF/page/"/>
- <property name="velocityProperties">
- <props>
- <prop key="input.encoding">UTF-8</prop>
- <prop key="output.encoding">UTF-8</prop>
- <prop key="contentType">text/html;charset=UTF-8</prop>
- </props>
- </property>
- </bean>
- <!-- JSP视图解析器 -->
- <bean id="viewResolverJsp" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/page/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
- <!-- FreeMarker视图解析器 -->
- <bean id="viewResolver" class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver">
- <property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView"/>
- <property name="contentType" value="text/html; charset=utf-8"/>
- <property name="cache" value="false"/>
- <property name="viewNames" value="*.ftl"/>
- <property name="suffix" value=""/>
- <property name="order" value="2"/>
- </bean>
- <bean class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
- <property name="templateLoaderPath" value="/WEB-INF/page/"/>
- </bean>
- <bean id="multipartResolver"
- class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="maxUploadSize" value="1000000000"/>
- </bean>
- </beans>
|