36 lines
933 B
Java
36 lines
933 B
Java
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;
|
|
import com.baomidou.mybatisplus.extension.plugins.PerformanceInterceptor;
|
|
|
|
/**
|
|
* 单数据源配置(jeecg.datasource.open = false时生效)
|
|
* @author zhoujf
|
|
*
|
|
*/
|
|
@Configuration
|
|
@MapperScan(value={"org.jeecg.modules.**.mapper*"})
|
|
public class MybatisPlusConfig {
|
|
|
|
/**
|
|
* 分页插件
|
|
*/
|
|
@Bean
|
|
public PaginationInterceptor paginationInterceptor() {
|
|
return new PaginationInterceptor();
|
|
}
|
|
|
|
// /**
|
|
// * mybatis-plus SQL执行效率插件【生产环境可以关闭】
|
|
// */
|
|
// @Bean
|
|
// public PerformanceInterceptor performanceInterceptor() {
|
|
// return new PerformanceInterceptor();
|
|
// }
|
|
|
|
|
|
}
|