1234567891011121314151617181920212223242526272829303132333435 |
- package org.jeecg.config;
- import org.mybatis.spring.annotation.MapperScan;
- import org.springframework.context.annotation.Bean;
- import org.springframework.context.annotation.Configuration;
- import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
- /**
- * 单数据源配置(jeecg.datasource.open = false时生效)
- * @Author zhoujf
- *
- */
- @Configuration
- @MapperScan(value={"org.jeecg.modules.**.mapper*","cn.com.ctop.**.mapper*"})
- public class MybatisPlusConfig {
- /**
- * 分页插件
- */
- @Bean
- public PaginationInterceptor paginationInterceptor() {
- // 设置sql的limit为无限制,默认是500
- return new PaginationInterceptor().setLimit(-1);
- }
-
- // /**
- // * mybatis-plus SQL执行效率插件【生产环境可以关闭】
- // */
- // @Bean
- // public PerformanceInterceptor performanceInterceptor() {
- // return new PerformanceInterceptor();
- // }
-
-
- }
|