SpringMVC整合
搭建整合环境步骤

整合说明
- SSM整合可以使用多种方式,选择配置文件 XML + 注解的方式
整合的思路
- 先搭建整合的环境
- 先把Spring的配置搭建完成
- 再使用Spring整合SpringMVC框架
- 最后使用Spring整合MyBatis框架
创建数据库和表结构
create database ssm;
use ssm;create table account(
id int primary key auto_increment,
name varchar(20),
money double
);
<!--0-->
#### 编写实体类,在ssm_domain项目中编写
#### 编写dao接口
#### 编写service接口和实现类
## Spring框架代码的编写
### 搭建和测试Spring的开发环境
#### 在ssm_web项目中创建applicationContext.xml的配置文件,编写具体的配置信息
<!--1-->
#### 在ssm_web项目中编写测试方法,进行测试
<!--2-->
## Spring整合SpringMVC框架
### 搭建和测试SpringMVC的开发环境
#### 在web.xml中配置DispatcherServlet前端控制器
<!--3-->
#### 创建springmvc.xml的配置文件,编写配置文件
<!--4-->
#### 测试SpringMVC的框架搭建是否成功
* 编写index.jsp和list.jsp编写,超链接
<!--5-->
* 创建AccountController类,编写方法,进行测试
<!--6-->
### Spring整合SpringMVC的框架
* 目的:在controller中能成功的调用service对象中的方法。
* 在项目启动的时候,就去加载applicationContext.xml的配置文件,在web.xml中配置 ContextLoaderListener监听器(该监听器只能加载WEB-INF目录下的applicationContext.xml的配置文 件)。
<!--7-->
#### 在controller中注入service对象,调用service对象的方法进行测试
<!--8-->
## Spring整合MyBatis框架
### 搭建和测试MyBatis的环境
#### 在web项目中编写SqlMapConfig.xml的配置文件,编写核心配置文件
<!--9-->
#### 在AccountDao接口的方法上添加注解,编写SQL语句
<!--10-->
#### 测试
<!--11-->
### Spring整合MyBatis框架
#### 目的
* 把SqlMapConfig.xml配置文件中的内容配置到applicationContext.xml配置文件中
<!--12-->
#### 在AccountDao接口中添加@Repository注解
#### 在service中注入dao对象,进行测试
<!--13-->
#### 配置Spring的声明式事务管理
<!--14-->