pagehelper / pagehelper-spring-boot

pagehelper-spring-boot
MIT License
1.55k stars 311 forks source link

pagehelper是否强依赖mybatis #26

Open skipper-sj opened 6 years ago

skipper-sj commented 6 years ago

mybatis的starter是自己写的,引入了自定义mybatis starter,没有引用官方的starter,启动之后,一直进入不了interceptor,发现PageHelperAutoConfiguration中有一行@AutoConfigureAfter(MybatisAutoConfiguration.class),是否表示必须引用官方的才能够使用

abel533 commented 6 years ago

这个starter是这样,你可以参考这个starter,把关键部分摘出来自己配置插件就行。

cj121992 commented 6 years ago

这个starter可以写的更通用点,可以去掉@autoconfigureafter(MybatisAutoConfiguration.class),然后注入sqlSesssionFactory[]来保证mybatis-spring-boot-starter在这个之前启用,是否能达到同样的目的而不用强依赖于官方的mybatis-starter

abel533 commented 6 years ago

确实可以这么实现,我会找时间尽快测试。

hL-ab commented 1 year ago

5年了,这个还没有更新呢。已经移除了enhancement标签,是有什么变化吗?