pagehelper,PageInterceptor被加载了两次

我使用pagehelper-spring-boot-starter-1.2.5 也出现这个问题,springboot启动完后发现有2个PageHelperAutoConfiguration的bean:
{
“bean”: “pageHelperAutoConfiguration”,
“aliases”: [],
“scope”: “singleton”,
“type”: “com.github.pagehelper.autoconfigure.PageHelperAutoConfigurationE n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIBEnhancerBySpringCGLIB71aad5bc”,
“resource”: “URL [jar:file:/E:/downloads/gradle_repository/caches/modules-2/files-2.1/com.github.pagehelper/pagehelper-spring-boot-autoconfigure/1.2.3/6e8c7e8fd31268b0b5960cc90f4aa82304a4d628/pagehelper-spring-boot-autoconfigure-1.2.3.jar!/com/github/pagehelper/autoconfigure/PageHelperAutoConfiguration.class]”,
“dependencies”: [“sqlSessionFactory”, “pagehelper-com.github.pagehelper.autoconfigure.PageHelperProperties”]
},

{
“bean”: “com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration”,
“aliases”: [],
“scope”: “singleton”,
“type”: “com.github.pagehelper.autoconfigure.PageHelperAutoConfigurationE n h a n c e r B y S p r i n g C G L I B EnhancerBySpringCGLIBEnhancerBySpringCGLIB71aad5bc”,
“resource”: “null”,
“dependencies”: [“sqlSessionFactory”, “pagehelper-com.github.pagehelper.autoconfigure.PageHelperProperties”]
},
在springboot启动类中添加了排除后正常了:
@SpringBootApplication(exclude = PageHelperAutoConfiguration.class)


版权声明:本文为miaoao611原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。