elunez / eladmin

eladmin jpa 版本:项目基于 Spring Boot 2.6.4、 Jpa、 Spring Security、Redis、Vue的前后端分离的后台管理系统,项目采用分模块开发方式, 权限控制采用 RBAC,支持数据字典与数据权限管理,支持一键生成前后端代码,支持动态路由
https://eladmin.vip/demo
Apache License 2.0
21.14k stars 7.34k forks source link

请教一下,我想把JPA换成了MybatisPlus怎么处理,我这边使用的时候启动异常 #712

Closed ZevixQuatol closed 2 years ago

ZevixQuatol commented 2 years ago

1.版本: v2.6 2.环境:本地 3.复现步骤:我把jpa换成了mybatis-plus支持,在使用日志注解时,在mapper注入的时候springboot一直启动报错 4.日志提供:

Description:

Field logMapper in com.lh.common.service.impl.LogServiceImpl required a bean of type 'com.lh.common.mapper.LogMapper' that could not be found.

Action:

Consider defining a bean of type 'com.lh.common.mapper.LogMapper' in your configuration.
ZevixQuatol commented 2 years ago

使用场景时springcloud 公用日志模块,其他配置都是做了的,但是一直报这个错,找不到相应的解决办法

miaoyinjun commented 2 years ago

LogMapper 没被扫描到吧,指定下路径@MapperScan("com.boot...modules.*.mapper") 可参考:https://gitee.com/miaoyinjun/boot-admin,基于eladmin替换了mybatis-plus,其它作了增强