随笔分类 -  Mybatis

摘要:mapper: public interface BlogMapper { List<Blog> getBlogByIF(Map map); } IF <select id="getBlogByIF" resultType="blog" parameterType="map"> select * f 阅读全文
posted @ 2020-05-14 16:22 努力学习的Peanut 阅读(186) 评论(0) 推荐(0)
摘要:步骤: 1.创建maven项目 2.编写工具类 3.编写实体类 4.编写mapper接口 5.配置xml 6.测试 多对一:多个学生关联一个老师 工具类: //sqlSessionFactory -->sqlSession public class MybatisUtils { private st 阅读全文
posted @ 2020-05-13 12:40 努力学习的Peanut 阅读(175) 评论(0) 推荐(0)