![](https://img-blog.csdnimg.cn/20190918140129601.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
mybatis
文章平均质量分 69
Mybatis
ZNineSun
大道至简,返璞归真
展开
-
Mybatis 中的 DAO 接口和 XML 文件里的 SQL 是如何建立关系的?
SqlSource以及动态标签SqlNodeMappedStatement对象Spring工厂Bean以及动态代理SqlSession以及执行器2、针对有两个XML文件和这个Dao建立关系是否会冲突的问题:不管有几个XML和Dao建立关系,只要保证唯一即可。原创 2022-09-08 17:37:15 · 325 阅读 · 0 评论 -
springBoot集成mybatisPlus
1.添加驱动依赖1.1 mysql1.2 sqlServer2.添加mybatis plus依赖3.添加相应的配置4.配置分页插件5.添加自动生成代码的功能6.主运行程序上添加注解@MapperScan1.添加驱动依赖1.1 mysql <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java&..原创 2021-04-29 09:32:01 · 790 阅读 · 0 评论 -
mybatis在列表中查询
1.mapper的配置public interface TbCourseMapper { List<TbCourse> getWithIds(@Param("params") Map<String,Object> map);}2.mapper.xml文件中的写法<select id="getWithIds" resultType="com.certificate.course_center.po.TbCourse" paramet原创 2021-03-05 23:30:57 · 484 阅读 · 0 评论 -
mybatis以及mysql常见问题
1.设置外键失败问题1.问题描述alter table stu add foreign key(cno) references user(id);Failed to add the foreign key constraint. Missing index for constraint ‘stu_ibfk_1’ in the referenced table ‘user’2.解决方案:...原创 2020-02-09 00:28:20 · 770 阅读 · 0 评论 -
springboot整合分页Pagehelper
默认已经配置好了mybatis了如果没有配置好,请参考 springBoot&&mybatis接下来开始我们的正文:1.引入相关的jar包,在pom.xml文件中:<!-- https://mvnrepository.com/artifact/com.github.pagehelper/pagehelper-spring-boot-starter -->&...原创 2018-12-16 17:47:00 · 269 阅读 · 0 评论