|
@@ -1,5 +1,9 @@
|
|
|
package com.ruoyi.common.datasource.config;
|
|
package com.ruoyi.common.datasource.config;
|
|
|
|
|
|
|
|
|
|
+import com.baomidou.mybatisplus.annotation.DbType;
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
|
|
|
|
|
+import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
|
|
|
|
|
+import org.springframework.context.annotation.Bean;
|
|
|
import org.springframework.context.annotation.Configuration;
|
|
import org.springframework.context.annotation.Configuration;
|
|
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -10,11 +14,11 @@ import org.springframework.context.annotation.Configuration;
|
|
|
//@MapperScan(basePackages = {"com.hdkj.**.mapper", })
|
|
//@MapperScan(basePackages = {"com.hdkj.**.mapper", })
|
|
|
public class MybatisConfig {
|
|
public class MybatisConfig {
|
|
|
|
|
|
|
|
-// @Bean
|
|
|
|
|
-// public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
|
|
-// MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
|
|
-// interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
|
|
|
|
-// return interceptor;
|
|
|
|
|
-// }
|
|
|
|
|
|
|
+ @Bean
|
|
|
|
|
+ public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
|
|
+ MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
|
|
+ interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
|
|
|
|
+ return interceptor;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
}
|
|
}
|