准备数据源
JDBC连接及操作数据库
引入MySQL驱动包
注解方式使用Mapper
User模块Mapper层:UserMapper.java
User模块测试类:UserTest.java
测试结果
测试结果如下图所示: