首页>代码>java通过jsoup爬取最代码牛币兑换活动>/spring-boot-jd-jsoup-master/src/main/java/com/simon/jsoup/config/MybatisConfig.java
package com.simon.jsoup.config;

import com.baomidou.mybatisplus.plugins.PaginationInterceptor;
import com.baomidou.mybatisplus.plugins.PerformanceInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author Simon
 */
@Configuration
@MapperScan("com.simon.jsoup.dao")
public class MybatisConfig {

    /***
     * plus 的性能优化
     */
    @Bean
    public PerformanceInterceptor performanceInterceptor() {
        PerformanceInterceptor performanceInterceptor = new PerformanceInterceptor();
        /*<!-- SQL 执行性能分析,开发环境使用,线上不推荐。 maxTime 指的是 sql 最大执行时长 -->*/
        performanceInterceptor.setMaxTime(1000);
        /*<!--SQL是否格式化 默认false-->*/
        performanceInterceptor.setFormat(true);
        return performanceInterceptor;
    }

    /**
     * mybatis-plus分页插件
     */
    @Bean
    public PaginationInterceptor paginationInterceptor() {
        return new PaginationInterceptor();
    }
}
最近下载更多
maojiujiu  LV3 2023年2月7日
SZEPEZS  LV8 2022年6月10日
开发中  LV5 2022年4月8日
最代码官方  LV167 2022年3月3日
最近浏览更多
adminLi  LV1 1月10日
yuan666  LV1 2023年12月4日
内心向阳  LV4 2023年11月7日
再曾一碗饭 2023年10月24日
暂无贡献等级
txf123  LV4 2023年9月21日
多加两块钱  LV4 2023年6月12日
GeminiLong  LV6 2023年4月27日
fewfsdaf  LV4 2023年4月16日
神龙摆尾无拘束  LV2 2023年3月17日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友