
mybatis
niceguy_smile
Java资深技术专家,专注于java领域,并发编程,jvm,分布式微服务等 欢迎各位大佬共同交流技术
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
mybatis逆向工程使用的建议
mybatis逆向工程在小公司使用的还是蛮多的。有的时候使用mybatis逆向工程,生成的实体类的类型可能不是我们想要的,这时候如果修改生成的类,那么每次生成都需要修改。这时候就需要使用反射和代理模式增强。 mapper什么的尽量也不要修改,可以添加一个新的mapper。...原创 2020-02-02 21:15:30 · 653 阅读 · 0 评论 -
谈一谈对mybatis逆向工程的看法
mybatis逆向工程不适合大项目,毕竟sql都是写死的,不灵活, 而且像count(*)这种函数效率很低,返回的类型还是int,然后还不支持多表关联查询(不过join本身效率就低,这个不支持也就不支持了),mybatis的逆向工程对于分页来说并不友好,而且有些mapper修改完之后下次生成还会覆盖...原创 2019-12-03 17:56:11 · 1026 阅读 · 0 评论 -
springboot整合mybatis org.mybatis.spring.MyBatisSystemException
Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapp...原创 2019-11-21 18:18:24 · 506 阅读 · 0 评论 -
Springcloud整合mybatis org.springframework.web.util.NestedServletException
先贴错误:org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.atgui...原创 2019-11-21 09:10:30 · 456 阅读 · 0 评论 -
mybatis Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException
Resolved exception caused by handler execution: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for property named '...原创 2019-11-20 16:18:23 · 1163 阅读 · 0 评论 -
Springboot使用Beanutils转换mybatis逆向工程生成的类抛出java.lang.ClassCastException
异常如下:java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer at org.apache.ibatis.type.IntegerTypeHandler.setNonNullParameter(IntegerTypeHandler.java:26) ~[mybatis-3....原创 2019-11-19 16:59:27 · 565 阅读 · 0 评论 -
springboot整合mybatis逆向工程 import导入mapper飘红解决方案
在mapper接口上加上@Repository注解或者@Mapper注解即可。原创 2019-11-19 15:13:27 · 695 阅读 · 0 评论 -
Springboot整合mybatis org.springframework.beans.factory.UnsatisfiedDependencyException
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-11-16 20:30:21.538 ERROR 18740 --- [ restartedMain] o.s.boot.SpringApplication ...原创 2019-11-16 20:38:47 · 1065 阅读 · 0 评论 -
springboot+mybatis com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException异常解决方案
## Error updating database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViolationException: Duplicate entry '219' for key 'PRIMARY'### The error may involve com.atguigu.gmall.mana...原创 2019-11-08 14:17:07 · 1552 阅读 · 1 评论 -
springboot整合mybatis+dubbo时javax.management.InstanceNotFoundException
解决方案取消选中这个原创 2019-11-04 22:36:25 · 308 阅读 · 0 评论 -
@Mapper注解和@Repository注解的区别
@Repository需要用@MapperScan扫描mapper才能注入@Bean而@Mapper注解相当于@Repository注解+@MapperScan注解,通过xml文件下的namespace命名空间自动注入bean原创 2019-10-27 19:51:42 · 6722 阅读 · 0 评论 -
springboot整合mybatis bean注入失败最新解决方案
先贴图先说说我的具体排查思路1.先看看数据库类型和实体类类型是否一致2.是否忘了加注解3.检查配置文件的数据源配置和mybatis配置4.换个数据源5.写单元测试类绕过service层6.看pom文件的resource注解配置的mapper路径是否正确,xml配置文件路径是否和mapper接口类路径一致7.看xml配置文件中的mapper路径是否写错8.检查p...原创 2019-10-24 19:38:29 · 1578 阅读 · 0 评论