springMVC.xml配置
来源:互联网 发布:分层网络模型优点 编辑:程序博客网 时间:2024/06/14 08:45
springMVC.xml
<?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:jdbc="http://www.springframework.org/schema/jdbc"xmlns:jee="http://www.springframework.org/schema/jee"xmlns:aop="http://www.springframework.org/schema/aop"xmlns:tx="http://www.springframework.org/schema/tx"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.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd"> <!-- 配置视图解析器 --> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <!-- 使用前缀和后缀 --> <property name="prefix" value="/"></property> <property name="suffix" value=".jsp"></property> </bean> <!-- 使用组件扫描的方式可以一次扫描多个Controller --> <context:component-scan base-package="com.wxisme.ssm.controller"> </context:component-scan> <!-- 配置注解的处理器映射器和处理器适配器 --> <mvc:annotation-driven conversion-service="conversionService"></mvc:annotation-driven> <!-- 自定义参数类型绑定 --> <bean id="conversionService" class="org.springframework.format.support.FormattingConversionServiceFactoryBean"> <property name="converters"> <list> <!-- 日期类型绑定 --> <bean class="com.wxisme.ssm.controller.converter.DateConverter"/> </list> </property> </bean> <!-- 访问静态资源文件 --> <!-- <mvc:default-servlet-handler/> 需要在web.xml中配置--> <mvc:resources mapping="/images/**" location="/images/" /> <mvc:resources mapping="/css/**" location="/css/" /> <mvc:resources mapping="/js/**" location="/js/" /> <mvc:resources mapping="/imgdata/**" location="/imgdata/" /> <!-- 定义拦截器 --> <mvc:interceptors> <!-- 直接定义拦截所有请求 --> <bean class="com.wxisme.ssm.interceptor.IdentityInterceptor"></bean> <!-- <mvc:interceptor> 拦截所有路径的请求 包括子路径 <mvc:mapping path="/**"/> <bean class="com.wxisme.ssm.interceptor.IdentityInterceptor"></bean> </mvc:interceptor> --> </mvc:interceptors> <!--配置上传文件数据解析器 --> <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> <property name="maxUploadSize"> <value>9242880</value> </property> </bean> <!-- 定义全局异常处理器 --> <!-- 只有一个全局异常处理器起作用 --> <bean id="exceptionResolver" class="com.wxisme.ssm.exception.OverallExceptionResolver"></bean> </beans>
阅读全文
0 0
- SpringMVC配置XML
- springmvc---xml配置
- springmvc.xml配置说明
- springMVC-servlet.xml 配置
- SpringMVC配置XML
- 基于xml配置springmvc
- springmvc-back.xml 配置
- SpringMVC XML配置
- SpringMVC servlet.xml配置
- SpringMVC web.xml配置
- SpringMVC applicationContext.xml配置
- 【SpringMVC】XML配置说明
- SpringMVC web.xml配置
- SpringMVC.xml配置
- springMVC.xml配置
- springmvc xml 配置 springmvc-context.xml
- SpringMVC注解开发springmvc.xml的配置
- 【springmvc 5】---怎么配置springmvc.xml?
- 【AI年薪大pk】美国从业者平均年薪73万,中国应届生30万起
- 如何取出Map中的key和value
- nrfutil pkg generate --help
- Openstack之安装neutron
- css 自定义样式 继承写法
- springMVC.xml配置
- Windows/Linux 远程桌面访问CentOS
- windows下使用cygwin搭建git服务器
- 无缝滚动效果
- 转【jspf】
- 【Educational Codeforces Round 33】 B. Beautiful Divisors (枚举)
- 说说css中pt、px、em、rem都扮演了什么角色
- Excel制作柱形图
- Js关于原型以及原型链的详细介绍