2021-12-31 09:59:55 +08:00
|
|
|
package com.xjs.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;
|
|
|
|
|
|
|
|
|
|
/**
|
2022-01-19 09:07:47 +08:00
|
|
|
* mp配置类
|
2021-12-31 09:59:55 +08:00
|
|
|
* @author xiejs
|
2022-01-19 09:07:47 +08:00
|
|
|
* @since 2021-12-31
|
2021-12-31 09:59:55 +08:00
|
|
|
*/
|
|
|
|
|
@Configuration
|
|
|
|
|
public class MybatisPlusConfig {
|
|
|
|
|
|
|
|
|
|
/**
|
2022-01-19 09:07:47 +08:00
|
|
|
* mp分页插件
|
2021-12-31 09:59:55 +08:00
|
|
|
* @return MybatisPlusInterceptor
|
|
|
|
|
*/
|
|
|
|
|
@Bean
|
|
|
|
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
|
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
|
|
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL));
|
|
|
|
|
return interceptor;
|
|
|
|
|
}
|
|
|
|
|
}
|