SpringMvc的配置文件
来源:互联网 发布:和晟实业投资 知乎 编辑:程序博客网 时间:2024/05/18 01:46
<?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:p="http://www.springframework.org/schema/p" xmlns:mvc="http://www.springframework.org/schema/mvc" xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd 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"> <!-- 启用注解功能 --> <context:annotation-config /> <!-- <bean id="freemarkerConfig" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer"> <property name="templateLoaderPath" value="/WEB-INF/ftl/" /> <property name="freemarkerSettings"> <props> <prop key="defaultEncoding">UTF-8</prop> <prop key="template_update_delay">0</prop> <prop key="default_encoding">UTF-8</prop> <prop key="number_format">0.##########</prop> <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop> <prop key="classic_compatible">true</prop> <prop key="template_exception_handler">ignore</prop> </props> </property> </bean> <bean class="org.springframework.web.servlet.view.freemarker.FreeMarkerViewResolver" p:prefix="/" p:suffix=".ftl"> <property name="cache" value="false" /> <property name="viewClass" value="org.springframework.web.servlet.view.freemarker.FreeMarkerView" /> <property name="contentType" value="text/html;charset=UTF-8"></property> <property name="exposeRequestAttributes" value="true" /> <property name="exposeSessionAttributes" value="true" /> <property name="exposeSpringMacroHelpers" value="true" /> <property name="requestContextAttribute" value="base"></property> <property name="order" value="0"></property> </bean> --> <!-- SpringMVC管理handler对象 --> <context:component-scan base-package="com.yue.ssm" use-default-filters="false"> <context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/> </context:component-scan> <!-- 视图解析器 --> <bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/WEB-INF/views/"/> <property name="suffix" value=".jsp"/> </bean> <!-- 标准配置 --> <mvc:default-servlet-handler/> <!-- 支持对象与json的转换。 --> <mvc:annotation-driven/> <!-- 穿越火线 --> <!-- <mvc:view-controller path="" view-name=""/> --> <!-- 异常解析器 --> <bean id="simpleMappingExceptionResolver" class="org.springframework.web.servlet.handler.SimpleMappingExceptionResolver"> <!-- error页面通过value名称来获取异常对象 默认值:"exception" <property name="exceptionAttribute" value="e"/> --> <property name="exceptionMappings"> <props> <prop key="java.lang.Exception">error</prop> </props> </property> </bean> <!-- 文件上传解析器 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="defaultEncoding" value="UTF-8"></property> <property name="maxUploadSize" value="10241000"></property> </bean> <!-- 国际化资源管理 --> <bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="i18n"></property> </bean> <bean id="localeResolver" class="org.springframework.web.servlet.i18n.SessionLocaleResolver"></bean> <!-- 拦截器 --> <!-- 配置LocaleChangeInterceptor拦截器 --> <mvc:interceptors> <bean id="localeChangeInterceptor" class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor"/> </mvc:interceptors></beans>
阅读全文
0 0
- springMvc的配置文件springmvc.xml
- springMVC的配置文件
- springMVC配置文件的编写
- SpringMVC配置文件的补充
- springMVC的配置文件
- SpringMVC的配置文件
- SpringMVC 的配置文件实例
- springMVC的配置文件
- springmvc+mybatis 的配置文件
- SpringMvc的配置文件
- SpringMVC的配置文件
- SpringMVC的配置文件
- springMVC(2) 改写springMVC的核心配置文件
- 【SpringMVC学习03】-SpringMVC的配置文件详解
- SpringMvc配置文件的动态载入
- springMVC配置文件的解释(1)
- SpringMVC配置文件的头信息
- springmvc---web.xml的配置文件
- 指数型组织:打造独角兽公司的11个最强属性
- j2ee-规范-jdbc四种驱动
- html中linecap示例
- html中lineJoin示例
- Spring的配置文件
- SpringMvc的配置文件
- mabatis 的映射文件mybatis-mapper.xml配置
- mybatis的逆向生成配置mybatis-generaction.xml
- mybatis的缓存配置--ehcache.xml(缓存配置文件)
- css选择器优先级及权重计算
- udev是什么? 它的目的何在?
- html中线性渐变
- 2017-05-27 IT杂谈,决断力读书笔记之找出与你持相反观点的人
- [LeetCode]Freedom Trail