码迷,mamicode.com
首页 > 其他好文 > 详细

mybatis 再理解 1

时间:2016-01-05 20:55:54      阅读:222      评论:0      收藏:0      [点我收藏+]

标签:

1. 直接先上一个例子:

技术分享

技术分享

在 Java代码中,你可以使用如下触发 SQL语句:

SqlSession session = getSqlSessionFactory().openSession(); 
StudentMapper mapper = session.getMapper(StudentMapper.class); // Select Student by Id Student student = mapper.selectStudentById(1); //To insert a Student record mapper.insertStudent(student);

技术分享

 

二.一些知识点:

技术分享

技术分享

技术分享

技术分享

使用方法1:

技术分享

技术分享

使用方法2:

技术分享

技术分享

技术分享

技术分享

使用方法3:

技术分享

技术分享

技术分享

技术分享

 

三. 分析mybatis-config.xml

技术分享

技术分享

技术分享

 

mybatis 再理解 1

标签:

原文地址:http://www.cnblogs.com/qinjiayan/p/5103329.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!