You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
784 B
27 lines
784 B
package cn.soul2.demo.config;
|
|
|
|
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;
|
|
|
|
/**
|
|
* @author Soul2
|
|
* @date 2022-08-15 11:57:02
|
|
* @since 1.0
|
|
*/
|
|
|
|
//@Slf4j
|
|
@Configuration
|
|
public class BeanConfig {
|
|
|
|
@Bean
|
|
public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
|
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
|
// 向Mybatis过滤器链中添加分页拦截器
|
|
interceptor.addInnerInterceptor(new PaginationInnerInterceptor());
|
|
// 还可以添加其他的拦截器
|
|
return interceptor;
|
|
}
|
|
}
|
|
|
|
|