MybatisPlusConfig.java 1.3 KB
//package com.huaheng.framework.config;
//
//import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
//import org.mybatis.spring.annotation.MapperScan;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//
//@Configuration
//@MapperScan({"com.huaheng.pc.**.**.mapper", "com.huaheng.pc.**.**.**.mapper"})
//public class MybatisPlusConfig {
//
//    /**
//     * mybatis-plus分页插件<br>
//     * 文档:http://mp.baomidou.com<br>
//     */
//    @Bean
//    public PaginationInterceptor paginationInterceptor() {
//        PaginationInterceptor page  = new PaginationInterceptor();
////          开启 PageHelper 的支持
//        page.setLocalPage(true);
////        page .setDialectType("mysql");
//        return page ;
//    }
//
////    /**
////     * 相当于顶部的: @MapperScan("com.baomidou.springboot.mapper*")  二选一就可以
////     * 这里可以扩展,比如使用配置文件来配置扫描Mapper的路径
////     */
////    @Bean
////    public MapperScannerConfigurer mapperScannerConfigurer() {
////        MapperScannerConfigurer scannerConfigurer = new MapperScannerConfigurer();
////        scannerConfigurer.setBasePackage("com.baomidou.springboot.mapper*");
////        return scannerConfigurer;
////    }
//
//}