随笔分类 -  mybatis

mybatis plus 两个包实体名字相同启动报错
摘要:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'authClientController' defined in file [E:\www\java\wo 阅读全文

posted @ 2024-05-10 17:20 何苦-> 阅读(317) 评论(0) 推荐(0) 编辑

mybatis报错:Error evaluating expression
摘要:mybatis的mapper文件中报了这么一个错 org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error evaluating e 阅读全文

posted @ 2023-12-27 16:53 何苦-> 阅读(2335) 评论(0) 推荐(0) 编辑

解决错误 org.apache.ibatis.type.TypeException: The alias xxx is already mapped to the value xxxxx
摘要:具体错误信息如下:其实就是此类名和其他包有冲突 那么解决办法就是声明一个别名就好了:使用注解 解決办法 阅读全文

posted @ 2023-09-15 15:34 何苦-> 阅读(1674) 评论(0) 推荐(1) 编辑

mybatis时间字段存入mysql数据库时间差一秒的问题
摘要:环境: - springboot mybatisplus - entry ``` import java.util.Date; /** * 促销开始时间 */ @JsonFormat( pattern = "yyyy-MM-dd HH:mm:ss" ) @ApiModelProperty(value 阅读全文

posted @ 2023-08-29 17:29 何苦-> 阅读(335) 评论(0) 推荐(0) 编辑

mybatis if标签判断Integer类型的值不等于0 (!=''等价于!=0)
摘要:### 场景 当传入的`activityInfoDTO`属性`codeAction`的值为0时,需要通过状态`(code_action =0或1)`来查询数据,`code_action `类型为`Integer` ``` and code_action = #{activityInfoDTO.cod 阅读全文

posted @ 2023-07-14 09:52 何苦-> 阅读(1024) 评论(0) 推荐(0) 编辑

mybatis Ipage 分页返回 实体转vo
摘要:``` log.info("[ActivityInfoServiceImpl][importGainNowRewardRules],分页查询方法,开始,activityInfoVO={}", JSON.toJSONString(activityInfoVO)); if (null == activi 阅读全文

posted @ 2023-06-30 14:36 何苦-> 阅读(800) 评论(0) 推荐(0) 编辑

MYBATIS中>=和<=的实现方式
摘要:- 原因 `mybatis`使用的是`xml`格式的文件。使用`>`和`=使用 =]]>` `>` 阅读全文

posted @ 2023-05-25 10:00 何苦-> 阅读(2413) 评论(0) 推荐(0) 编辑

java Mybatis-Plus之实现批量插入
摘要:使用batchSave Mybatis-Plus提供了IService接口,里面提供了batchSave方法,即批量保存方法 创建Service接口 创建一个基继承了Mybatis-Plus提供的IService接口的接口 public interface TestService extends I 阅读全文

posted @ 2023-04-22 00:31 何苦-> 阅读(676) 评论(0) 推荐(0) 编辑

MybatisPlus #{param}和${param}的用法详解
摘要:作用 mybatis-plus接口mapper方法中的注解(如@Select)或者xml(如)传入的参数是通过#{param}或者${param}来获取值。 区别 1.解析方式: #{param}:会进行预编译,而且进行类型匹配,最后进行变量替换,括号中可以添加映射类型如 #{param,javaT 阅读全文

posted @ 2023-03-03 19:40 何苦-> 阅读(577) 评论(0) 推荐(0) 编辑

导航

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8
点击右上角即可分享
微信分享提示