首页>代码>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  LV9 2022年6月10日
开发中  LV5 2022年4月8日
最代码官方  LV168 2022年3月3日
最近浏览更多
ma406805131  LV19 2024年6月25日
微信网友_6902352269217792  LV3 2024年3月12日
adminLi  LV2 2024年1月10日
yuan666  LV1 2023年12月4日
内心向阳  LV4 2023年11月7日
再曾一碗饭 2023年10月24日
暂无贡献等级
txf123  LV6 2023年9月21日
多加两块钱  LV4 2023年6月12日
GeminiLong  LV6 2023年4月27日
fewfsdaf  LV4 2023年4月16日
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友