
mybatis
由浅及深
susie_小石头
这个作者很懒,什么都没留下…
展开
-
mybatis-generator-core 自动生成使用
mybatis-generator-core 自动生成实体,mapper。使开发人员减少了很多工作量。MybatisGenerator.xml 放resource下面。原创 2022-09-22 11:05:43 · 597 阅读 · 0 评论 -
Mybatis控制台打印SQL
在SpringBoot中,修改application.yml文件。原创 2022-08-17 09:49:29 · 272 阅读 · 0 评论 -
Mapper编写有哪几种方式?
第一种:接口实现类继承SqlSessionDaoSupport使用此种方法需要编写mapper接口,mapper接口实现类、mapper.xml文件。1、在sqlMapConfig.xml中配置mapper.xml的位置 2、定义mapper接口3、实现类集成SqlSessionDaoSupportmapper方法中可以this.getSqlSession()进行数据增删改查。4、spring配置 第二种:使用org.mybatis.spring.mapper.MapperFactoryBean1、原创 2022-07-03 16:58:07 · 1436 阅读 · 0 评论 -
mybatis的时间条件查询sql语句
一:sql server数据库的查询时间的方法 select * from student where YEAR(comeyear)=2015 select * from student where month(comeyear)=9 select * from student where day(comeyear)=1 select * from student where datepart(hh,comeyear)=9 select * from student where datepart(mi,原创 2021-12-10 16:08:31 · 2582 阅读 · 0 评论 -
mybatis中大于等于小于等于的写法
第一种: 原符号 < <= > >= & ' " 替换符号 < <= > >= & ' " create_date_time >= #{startTime} and create_date_time <= #{endTime} 第二种: 大于等原创 2021-12-10 16:00:17 · 529 阅读 · 0 评论