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: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的更多相关文章
- SpringMvc xml 配置
<?xml version="1.0" encoding="UTF-8"?> <web-app version="2.5" ...
- spring-mvc.xml配置文件出错
在整合ssm三大框架的时候,配置spring-mvc.xml的文件的 <mvc:default-servlet-handler/> <mvc:annotation-driven /& ...
- 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 ...
- 当你的SSM项目中的springmvc.xml发生第一行错误解决方案
当你新建了一个SSM项目,你复制网上的xml文件来配置或者你下载了一个SSM项目打开发现xml文件错误,打开是第一行报错的时候你是不是很懵逼 或者是这样 总之就是xml文件中<?xml vers ...
- 关于springMVC中component-scan的问题以及springmvc.xml整理
关于springMVC中component-scan的问题以及springmvc.xml整理 一.component-scan问题和解决办法 最近在学习使用springMVC+myba ...
- java.lang.IllegalArgumentException: Invalid source 'classpath:spring-mvc.xml'
今天在跑项目时遇到java.lang.IllegalArgumentException: Invalid source 'classpath:spring-mvc.xml'报错,自己也是摸索了很久,一 ...
- springmvc.xml 中 <url-pattern></url-pattern>节点详解
1. 先来上段常见的代码 <!-- MVC Servlet --> <servlet> <servlet-name>springServlet</servl ...
- Caused by: java.io.FileNotFoundException: class path resource [spring/springmvc.xml] cannot be opene
Caused by: java.io.FileNotFoundException: class path resource [spring/springmvc. ...
- spring-mvc.xml 和 application-context.xml的区别
转自:https://www.cnblogs.com/binlin1987/p/7053016.html application-context.xml是全局的,应用于多个serverlet,配合li ...
- springmvc.xml,context.xml和web.xml
1:springmvc.xml配置要点 一般它主要配置Controller的组件扫描器和视图解析器 下为:springmvc.xml文件 <?xml version="1.0" ...
随机推荐
- spark复习笔记(6):RDD持久化
在spark中最重要的功能之一是跨操作在内存中持久化数据集.当你持久化一个RDD的时候,每个节点都存放了一个它在内存中计算的一个分区,并在该数据集的其他操作中进行重用,持久化一个RDD的时候,节点上的 ...
- ajaxSubmit 实现图片上传 SSM maven
文件上传依赖: <!-- 文件上传组件 --> <dependency> <groupId>commons-fileupload</groupId> & ...
- linux相关认证和权限配置
[root@rsync-server-1 /]# echo 'rsync_backup:redhat' > /etc/rsync.password [root@rsync-server-1 /] ...
- lvm分区创建和扩容
shell> fdisk /dev/xvdb #### 选择磁盘 Command (m for help): m #### 帮助 Command action a toggle a bootab ...
- SQL 1 数据库 表的操作
数据库:是按照数据结构来组织.存储和管理数据的建立在计算机存储设备上的仓库.一句话就是存储数据的仓库 数据库的分类:网络数据库.层级数据库.关系结构数据库. 倘若按照数据库的存储介质来分:关系型数据库 ...
- 六、MyBatis-缓存机制
MyBatis 包含一个非常强大的查询缓存特性,它可以非常方便地配置和定制.缓存可以极大的提升查询效率.MyBatis系统中默认定义了两级缓存, 一级 缓存和 二级缓存.– 1.默认情况下,只有一级缓 ...
- Django登录(含随机生成图片验证码)注册实例
登录,生成随机图片验证码 一.登录 - 随机生成图片验证码 1.随机生成验证码 Python随机生成图片验证码,需要使用PIL模块,安装方式如下: pip3 install pillow 1)创建图片 ...
- Mardown加上目录
适合Jekyll+Github模式下post.html 中加入如下代码,会在页面加载时生成目录结构: 有两种方案: 方案一效果
- 调用搜狐IP地址库,根据不同访问者的IP,显示访问地址
<script src="http://pv.sohu.com/cityjson?ie=utf-8"></script> <script type ...
- c++11 指针空值
1. 引入nullptr的必要性: 典型的指针初始化是将其指向一个空的位置.比如: int* my_ptr = 0; int* my_ptr = NULL; 一般情况下,NULL是一个宏定义. #un ...