# MyBatisPlusConfig.java

    package cloud.wconnect.rateshop.config;

    import com.baomidou.mybatisplus.annotation.DbType;
    import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
    import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
    import org.mybatis.spring.annotation.MapperScan;
    import org.springframework.context.annotation.Bean;
    import org.springframework.context.annotation.Configuration;

    /**
     * 配置类：MyBatis Plus配置
     *
     * @author chenx
     * @date 2020/7/21
     */
    @Configuration
    @MapperScan("${mybatis.mapper.scan}")
    public class MyBatisPlusConfig {
        /**
         * 分页插件配置
         */
        @Bean
        public MybatisPlusInterceptor mybatisPlusInterceptor() {
            MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
            interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
            return interceptor;
        }
    }