mybatis-flex / mybatis-flex

mybatis-flex is an elegant Mybatis Enhancement Framework

Home Page:https://mybatis-flex.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

这个能和mybatis-plus 并存吗?毕竟有好多以前的代码

sevencat opened this issue · comments

类型:建议
如题

只要两者依赖的mybatis版本一致,理论上是互不影响的

我们现在的生产项目 mp myj mf共存的,除了需要去掉一个框架的事务自动注入,别的无感

我们现在的生产项目 mp myj mf共存的,除了需要去掉一个框架的事务自动注入,别的无感

方便给我们计讲吗?我们也来试试。

@sevencat
@Configuration @EnableAutoConfiguration(exclude = { FlexTransactionAutoConfiguration.class , MultiDataSourceAutoConfiguration.class , MybatisFlexAutoConfiguration.class , MybatisFlexAdminAutoConfiguration.class , MybatisLanguageDriverAutoConfiguration.class , org.mybatis.spring.boot.autoconfigure.MybatisLanguageDriverAutoConfiguration.class })

<dependency> <groupId>com.baomidou</groupId> <artifactId>dynamic-datasource-spring-boot-starter</artifactId> </dependency> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> </dependency> <dependency> <groupId>com.github.yulichang</groupId> <artifactId>mybatis-plus-join-boot-starter</artifactId> </dependency> <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <exclusions> <exclusion> <artifactId>jsqlparser</artifactId> <groupId>com.github.jsqlparser</groupId> </exclusion> <exclusion> <artifactId>mybatis</artifactId> <groupId>org.mybatis</groupId> </exclusion> </exclusions> </dependency> <dependency> <groupId>com.mybatis-flex</groupId> <artifactId>mybatis-flex-spring-boot-starter</artifactId> <exclusions> <exclusion> <artifactId>mybatis</artifactId> <groupId>org.mybatis</groupId> </exclusion> </exclusions> </dependency>

@203579397 万分感谢,过会就来试。

可以一起用么? exclude FlexTransactionAutoConfiguration.class 之后 plus可以正常使用,但是flex的mapper都被自动增强成plus风格,sql绑定参数会失败 @203579397 @sevencat

可以一起用么? exclude FlexTransactionAutoConfiguration.class 之后 plus可以正常使用,但是flex的mapper都被自动增强成plus风格,sql绑定参数会失败 @203579397 @sevencat

mapper肯定不能用了,MybatisFlexAutoConfiguration可以看出和plus有冲突,看起来有机会改成兼容。有空了试试。