From 98f51b0fe1f6051855d5719105cc8edfdd543697 Mon Sep 17 00:00:00 2001 From: yulichang <570810310@qq.com> Date: Sun, 6 Nov 2022 22:00:29 +0800 Subject: [PATCH] fix Parameter 'paramType_Gr8re1Ee' not found --- .../yulichang/config/InterceptorConfig.java | 28 ++++++------------- 1 file changed, 9 insertions(+), 19 deletions(-) diff --git a/src/main/java/com/github/yulichang/config/InterceptorConfig.java b/src/main/java/com/github/yulichang/config/InterceptorConfig.java index 5263176..e278645 100644 --- a/src/main/java/com/github/yulichang/config/InterceptorConfig.java +++ b/src/main/java/com/github/yulichang/config/InterceptorConfig.java @@ -1,6 +1,9 @@ package com.github.yulichang.config; import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInterceptor; +import com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration; import com.github.yulichang.toolkit.InterceptorList; import org.apache.ibatis.logging.Log; import org.apache.ibatis.logging.LogFactory; @@ -16,37 +19,24 @@ import java.util.List; /** * 兼容 page helper 插件类 - *
- * 可以自定义Conditional注解简化代码 todo
*
* @author yulichang
*/
@Configuration
+@ConditionalOnBean(SqlSessionFactory.class)
+@AutoConfigureBefore(value = {PageHelper.class, PageHelperAutoConfiguration.class, PageInterceptor.class})
@SuppressWarnings("unused")
public class InterceptorConfig {
+
private static final Log logger = LogFactory.getLog(InterceptorConfig.class);
- @Configuration
- @ConditionalOnBean(type = "com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration")
- @AutoConfigureBefore(name = {"com.github.pagehelper.autoconfigure.PageHelperAutoConfiguration"})
- public static class PhSpringBoot {
- public PhSpringBoot(List