<?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:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:context="http://www.springframework.org/schema/context"
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-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc-3.2.xsd"> <!--使Spring支持自动检测组件,如注解的Controller-->
<!-- <context:component-scan base-package="com.minx.crm.web.controller"/>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.InternalResourceViewResolver"
p:prefix="/WEB-INF/jsp/"
p:suffix=".jsp" /> -->
<!-- 处理器 -->
<bean name="/queryItems1.action" class="com.mybatis.controller.ItemsController1"></bean>
<!-- 注解的处理器可以单个配置 但是我们可以使用spring框架的组件扫描的方式来配置
base-package:需要扫描哪个包下面的处理器
-->
<context:component-scan base-package="com.mybatis.controller"></context:component-scan>
<!-- 处理器映射器 -->
<bean class="org.springframework.web.servlet.handler.BeanNameUrlHandlerMapping"/>
<!-- 注解的处理器映射器 -->
<!-- <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"></bean> -->
<!-- 处理器适配器 -->
<!-- 所有的适配器都实现HandlerAdapter接口 -->
<bean class="org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter"/>
<!-- 注解的处理器适配器 -->
<!-- <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"></bean> -->
<!-- 可代替上面注解的处理器和处理器适配器的配置 建议使用 -->
<mvc:annotation-driven></mvc:annotation-driven>
<!-- 视图解析器 -->
<!-- 解析jsp 默认使用jstl标签 classpath下得有jstl包 -->
<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<!-- 配置jsp路径的前缀 -->
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
</beans>

SpringMvc.xml的更多相关文章

  1. SpringMvc xml 配置

    <?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" ...

  2. spring-mvc.xml配置文件出错

    在整合ssm三大框架的时候,配置spring-mvc.xml的文件的 <mvc:default-servlet-handler/> <mvc:annotation-driven /& ...

  3. spring整合mybatis错误:class path resource [config/spring/springmvc.xml] cannot be opened because it does not exist

    spring 整合Mybatis 运行环境:jdk1.7.0_17+tomcat 7 + spring:3.2.0 +mybatis:3.2.7+ eclipse 错误:class path reso ...

  4. 当你的SSM项目中的springmvc.xml发生第一行错误解决方案

    当你新建了一个SSM项目,你复制网上的xml文件来配置或者你下载了一个SSM项目打开发现xml文件错误,打开是第一行报错的时候你是不是很懵逼 或者是这样 总之就是xml文件中<?xml vers ...

  5. 关于springMVC中component-scan的问题以及springmvc.xml整理

    关于springMVC中component-scan的问题以及springmvc.xml整理 一.component-scan问题和解决办法         最近在学习使用springMVC+myba ...

  6. java.lang.IllegalArgumentException: Invalid source 'classpath:spring-mvc.xml'

    今天在跑项目时遇到java.lang.IllegalArgumentException: Invalid source 'classpath:spring-mvc.xml'报错,自己也是摸索了很久,一 ...

  7. springmvc.xml 中 <url-pattern></url-pattern>节点详解

    1.  先来上段常见的代码 <!-- MVC Servlet --> <servlet> <servlet-name>springServlet</servl ...

  8. Caused by: java.io.FileNotFoundException: class path resource [spring/springmvc.xml] cannot be opene

                        Caused by: java.io.FileNotFoundException: class path resource [spring/springmvc. ...

  9. spring-mvc.xml 和 application-context.xml的区别

    转自:https://www.cnblogs.com/binlin1987/p/7053016.html application-context.xml是全局的,应用于多个serverlet,配合li ...

  10. springmvc.xml,context.xml和web.xml

    1:springmvc.xml配置要点 一般它主要配置Controller的组件扫描器和视图解析器 下为:springmvc.xml文件 <?xml version="1.0" ...

随机推荐

  1. go中基本数据类型转换为string类型的方法

    代码 // 基本数据类型转换为string类型 package main import ( "fmt" "strconv" ) func main() { // ...

  2. 三条路线告诉你如何掌握Spring IoC容器的核心原理

    原文链接:https://blog.csdn.net/bntx2jsqfehy7/article/details/78977178

  3. BZOJ 3729 GTY的游戏

    伪ETT? 貌似就是Splay维护dfn = = 我们首先观察这个博弈 这个博弈直接%(l+1)应该还是很显然的 因为先手怎么操作后手一定能保证操作总数取到(l+1) 于是就变成阶梯Nim了 因为对于 ...

  4. RedisTemplate 事务处理方法 watch multi exec 的使用

    @Autowired RedisTemplate<String,String> redisTemplate; redisTemplate.execute(new SessionCallba ...

  5. Minor GC、Major GC、Full GC 区别

    原创转载请注明出处:https://www.cnblogs.com/agilestyle/p/11488036.html Minor GC 清理年轻代 Minor GC指新生代GC,即发生在新生代(包 ...

  6. [BZOJ] IOI2015 Boxes纪念品盒

    问题描述 IOI2015 开幕式正在进行最后一个环节.按计划在开幕式期间,每个代表队都将收到由主办方发放的一个装有纪念品的盒子.然而所有志愿者都被精彩的开幕式所吸引,除 Aman外其他人完全忘记了发放 ...

  7. Dubbo学习-3-管理控制台搭建

    dubbo 2.6.x 的dubbo-admin管理控制台搭建 1.下载源码:https://github.com/apache/incubator-dubbo-ops 打开后切换到master分支 ...

  8. 2,ArrayList

    一,ArrayList简介 1,ArrayList 是一个数组队列,相当于动态数组.与Java中的数组相比,它的容量能动态增长. 2,ArrayList 继承了AbstractList,实现了List ...

  9. FastDFS搭建文件管理系统

    参考:https://www.cnblogs.com/chiangchou/p/fastdfs.html 目录: 一:FastDFS介绍 1:简介: FastDFS 是一个开源的高性能分布式文件系统( ...

  10. [USACO17FEB]Why Did the Cow Cross the Road III G (树状数组,排序)

    题目链接 Solution 二维偏序问题. 现将所有点按照左端点排序,如此以来从左至右便满足了 \(a_i<a_j\) . 接下来对于任意一个点 \(j\) ,其之前的所有节点都满足 \(a_i ...