| | |
| | | package com.zy.asrs.openapi.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; |
| | | |
| | | /** |
| | | * MybatisPlus配置 |
| | | * |
| | | * @author vincent |
| | | * @since 2018-02-22 11:29:28 |
| | | */ |
| | | @Configuration |
| | | public class MybatisPlusConfig { |
| | | |
| | | @Bean |
| | | public MybatisPlusInterceptor mybatisPlusInterceptor() { |
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); |
| | | |
| | | // 分页插件配置 |
| | | PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor(); |
| | | interceptor.addInnerInterceptor(paginationInnerInterceptor); |
| | | |
| | | return interceptor; |
| | | } |
| | | |
| | | } |
| | | package com.zy.asrs.openapi.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;
|
| | |
|
| | | /**
|
| | | * MybatisPlus配置
|
| | | *
|
| | | * @author vincent
|
| | | * @since 2018-02-22 11:29:28
|
| | | */
|
| | | @Configuration
|
| | | public class MybatisPlusConfig {
|
| | |
|
| | | @Bean
|
| | | public MybatisPlusInterceptor mybatisPlusInterceptor() {
|
| | | MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
|
| | |
|
| | | // 分页插件配置
|
| | | PaginationInnerInterceptor paginationInnerInterceptor = new PaginationInnerInterceptor();
|
| | | interceptor.addInnerInterceptor(paginationInnerInterceptor);
|
| | |
|
| | | return interceptor;
|
| | | }
|
| | |
|
| | | }
|