在同时使用Mybatis和JPA时,项目运行过程中会报如下问题:
InternalAuthenticationServiceException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sancaiwulian.smes.system.service.mapper
在Spring Boot项目中同时使用Mybatis和JPA时,出现'BindingException: Invalid bound statement (not found)'错误。问题源于JPA的MapStruct生成的MapperImpl未正确使用,被MybatisMapperProxy扫描。解决方案是调整Mybatis的MapperScan,避免扫描JPA的Mapper,并可能修改JPA Mapper的包名,确保不与Mybatis的mapper路径冲突。实施后,MapperBean将指向正确的实现类而非Mybatis的动态代理。
在同时使用Mybatis和JPA时,项目运行过程中会报如下问题:
InternalAuthenticationServiceException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.sancaiwulian.smes.system.service.mapper
2万+
1万+

被折叠的 条评论
为什么被折叠?
