增加分页插件
parent
c575e1391d
commit
d60978fda7
|
@ -0,0 +1,25 @@
|
|||
package com.god.base.server.util;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* mybatis-plus 分页配置类
|
||||
* @author 孙帅比
|
||||
*/
|
||||
@Configuration
|
||||
@MapperScan("com.god.base.server.mapper") //mapper持久层所在位置
|
||||
public class MyBatisPlusPageHelperConfig {
|
||||
|
||||
|
||||
/**
|
||||
* 项目启动创建分页插件实例
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
public PaginationInterceptor paginationInterceptor(){
|
||||
return new PaginationInterceptor();
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue