时间:2021-07-01 10:21:17 帮助过:26人阅读
将maven的依赖删除以后,手动模拟实现上面的入门案例:
[分析]
代码实现在GITHUB
结果:
使用的是XML
User{id=1, username='王五', birthday=null, sex='2', address='null'}
User{id=10, username='张三', birthday=2014-07-10, sex='1', address='北京市'}
User{id=16, username='张小明', birthday=null, sex='1', address='河南郑州'}
User{id=22, username='陈小明', birthday=null, sex='1', address='河南郑州'}
User{id=24, username='张三丰', birthday=null, sex='1', address='河南郑州'}
User{id=25, username='陈小明', birthday=null, sex='1', address='河南郑州'}
User{id=26, username='王五', birthday=null, sex='null', address='null'}
使用的是注解
User{id=1, username='王五', birthday=null, sex='2', address='null'}
User{id=10, username='张三', birthday=2014-07-10, sex='1', address='北京市'}
User{id=16, username='张小明', birthday=null, sex='1', address='河南郑州'}
User{id=22, username='陈小明', birthday=null, sex='1', address='河南郑州'}
User{id=24, username='张三丰', birthday=null, sex='1', address='河南郑州'}
User{id=25, username='陈小明', birthday=null, sex='1', address='河南郑州'}
User{id=26, username='王五', birthday=null, sex='null', address='null'}
手撸MyBatis从配置文件到读出数据库的模拟实现
标签:插入 ssi img comm code 数据库 catch version err