<?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. JS中数组和字符串方法的简单整理

    一.数组: 数组的基本方法:              1.增:arr.unshift() /push()    前增/后增                  2.删:arr.shift() /pop ...

  2. Spark Thrift Server

    ThriftServer是一个JDBC/ODBC接口,用户可以通过JDBC/ODBC连接ThriftServer来访问SparkSQL的数据.ThriftServer在启动的时候,会启动了一个Spar ...

  3. HTML导航框架实现

    导航栏界面(html_contents.html) <!DOCTYPE html> <html> <head> <meta charset=” utf-8” ...

  4. noscript

    <noscript> <article id="noscript" class="error info_panel"> <head ...

  5. Python之文件的读

    python中文件的读操作:以只读的形式打开文件->逐行读取文件中的内容->关闭文件 代码如下 #文件的读 f = file(u'F:\\python\\homework.txt', 'r ...

  6. Java基础学习(3)

    Java基础学习(三) Java异常 Throwable类:所有异常的祖先类 Error:虚拟机异常.内存错误.没法处理 Exception:编码.环境.用户操作输入出现问题 非检查异常(自动捕获): ...

  7. JVM垃圾回收算法图解

    参考文档:https://www.toutiao.com/a6691966641242112516/ 垃圾搜集算法 标记-清除法 标记-清除算法采用从根集合(GC Roots)进行扫描,对存活的对象进 ...

  8. Java的基本数据类型,以及他们的封装类

    基本类型  大小  默认值  封装类   boolean 1 false  Boolean  byte  1 0  Byte  char  2  \u0000(null)  Character  sh ...

  9. 1146. Topological Order (25)

    This is a problem given in the Graduate Entrance Exam in 2018: Which of the following is NOT a topol ...

  10. window.onload()和$(document).ready的区别( $(document).ready == $(function(){ }) )

    首先$(function(){}) 和 $(document).ready(function(){}) 是一个方法,$(function(){})为简写(用的多) $(document).ready和 ...