miwaiwai

导航

SM整合的步骤

SM整合的步骤

1>建表

2>新建项目,选择quickstart模板

3>修改目录

4>修改pom.xml文件,添加相关的依赖

5>添加MyBaits相应的模板(SqlMapconfig.xml和XXXMapper.xml文件)

6>添加SqlMapconfig.xml(MyBatis核心配置文件),并拷贝jdbc.properties属性文件resources

7>添加ApplicationContext_mapper.xml

8>添加ApplicationContext_service.xml

9>添加User实体类,Accounts实体类

10>添加mapper包添加UserMapper接口和UserMapper.xml文件并开发

11>添加service包,添加UsersService接口和UsersServiceImpl实现类

12>添加测试类进行功能测试

 

posted on 2022-08-27 10:51  米歪歪  阅读(73)  评论(0编辑  收藏  举报