首页 > 其他分享 >4

4

时间:2024-11-20 09:59:35浏览次数:1  
标签: mybatisplus MybatisPlusInterceptor baomidou import interceptor com

package com.example.demo11.config;

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

@Configuration
public class MPConfig {
@Bean
public MybatisPlusInterceptor mybatisPlusInterceptor() {
//定义MybatisPlus拦截器 分页拦截器
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
return interceptor;
}
}

标签:,mybatisplus,MybatisPlusInterceptor,baomidou,import,interceptor,com
From: https://www.cnblogs.com/luoqingci/p/18556201

相关文章