com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor Java Examples
The following examples show how to use
com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MyBatisConfig.java From seata-samples with Apache License 2.0 | 5 votes |
/** * MP 自带分页插件 * @return */ @Bean public PaginationInterceptor paginationInterceptor() { PaginationInterceptor page = new PaginationInterceptor(); page.setDialectType("mysql"); return page; }
Example #2
Source File: MybatisPlusConfig.java From supplierShop with MIT License | 4 votes |
/** * mybatis-plus分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #3
Source File: MybatisPlusConfig.java From sophia_scaffolding with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #4
Source File: MybatisPlusConfig.java From sophia_scaffolding with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #5
Source File: MybatisPlusConfig.java From yshopmall with Apache License 2.0 | 4 votes |
/** * mybatis-plus分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #6
Source File: MybatisPlusConfig.java From plumemo with Apache License 2.0 | 4 votes |
@Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #7
Source File: MybatisPlusConfig.java From teaching with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { // 设置sql的limit为无限制,默认是500 return new PaginationInterceptor().setLimit(-1); }
Example #8
Source File: MybatisplusAutoConfiguration.java From summerframework with Apache License 2.0 | 4 votes |
@Bean @ConditionalOnMissingBean(PaginationInterceptor.class) public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #9
Source File: MybatisPlusConfig.java From SpringBoot-Home with Apache License 2.0 | 4 votes |
/** * 注册分页插件 * @return */ @Bean public PaginationInterceptor paginationInterceptor(){ return new PaginationInterceptor(); }
Example #10
Source File: MyBatisPlusConfig.java From blog-sample with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #11
Source File: MybatisPlusConfig.java From hdw-dubbo with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #12
Source File: TarocoAuthenticationApplication.java From Taroco with Apache License 2.0 | 4 votes |
/** * Mybatis plus 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #13
Source File: MybatisPlusConfig.java From jeecg-boot with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { // 设置sql的limit为无限制,默认是500 return new PaginationInterceptor().setLimit(-1); }
Example #14
Source File: PaginationInterceptorConfiguration.java From spring-cloud-shop with MIT License | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #15
Source File: MybatisPlusConfig.java From spring-boot-demo with MIT License | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #16
Source File: MybatisPlusConfiguration.java From blade-tool with GNU Lesser General Public License v3.0 | 4 votes |
@Bean @ConditionalOnMissingBean(PaginationInterceptor.class) public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #17
Source File: MybatisPlusConfig.java From poseidon with Apache License 2.0 | 4 votes |
@Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #18
Source File: MybatisPlusConfig.java From ywh-frame with GNU General Public License v3.0 | 4 votes |
/** * 分页插件 * @return */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #19
Source File: LocMybatisAutoConfiguration.java From loc-framework with MIT License | 4 votes |
private @Nullable SqlSessionFactory createSqlSessionFactory( ConfigurableListableBeanFactory configurableListableBeanFactory, String prefixName, MybatisProperties mybatisProperties) { DataSource dataSource = configurableListableBeanFactory .getBean(prefixName + "Ds", DataSource.class); MybatisSqlSessionFactoryBean sqlSessionFactoryBean = new MybatisSqlSessionFactoryBean(); sqlSessionFactoryBean.setDataSource(dataSource); sqlSessionFactoryBean.setVfs(LocSpringBootVFS.class); Optional.ofNullable(mybatisProperties.getConfigLocation()).map(this.resourceLoader::getResource) .ifPresent(sqlSessionFactoryBean::setConfigLocation); org.apache.ibatis.session.Configuration configuration = mybatisProperties.getConfiguration(); if (configuration == null && !StringUtils.hasText(mybatisProperties.getConfigLocation())) { configuration = new org.apache.ibatis.session.Configuration(); } sqlSessionFactoryBean.setConfiguration(configuration); Optional.ofNullable(mybatisProperties.getConfigurationProperties()) .ifPresent(sqlSessionFactoryBean::setConfigurationProperties); Optional.ofNullable(mybatisProperties.getTypeAliasesPackage()) .ifPresent(sqlSessionFactoryBean::setTypeAliasesPackage); Optional.ofNullable(mybatisProperties.getTypeHandlersPackage()) .ifPresent(sqlSessionFactoryBean::setTypeHandlersPackage); if (!ObjectUtils.isEmpty(mybatisProperties.resolveMapperLocations())) { sqlSessionFactoryBean.setMapperLocations(mybatisProperties.resolveMapperLocations()); } PaginationInterceptor paginationInterceptor = new PaginationInterceptor(); sqlSessionFactoryBean.setPlugins(new Interceptor[]{paginationInterceptor}); try { SqlSessionFactory sqlSessionFactory = sqlSessionFactoryBean.getObject(); if (sqlSessionFactory == null) { log.error("sqlSessionFactoryBean get object is null"); return null; } register(configurableListableBeanFactory, sqlSessionFactory, prefixName + "SessionFactory", prefixName + "Sf"); if (!Strings.isNullOrEmpty(mybatisProperties.getBasePackage())) { createBasePackageScanner((BeanDefinitionRegistry) configurableListableBeanFactory, mybatisProperties.getBasePackage(), prefixName); } else { createClassPathMapperScanner((BeanDefinitionRegistry) configurableListableBeanFactory, prefixName); } return sqlSessionFactory; } catch (Exception e) { log.error(e.getMessage(), e); } return null; }
Example #20
Source File: MybatisPlusConfig.java From spring-boot-demo with MIT License | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #21
Source File: MybatisConfig.java From SpringCloud with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #22
Source File: MybatisConfig.java From SpringCloud with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #23
Source File: MybatisPlusConfig.java From mall4j with GNU Affero General Public License v3.0 | 4 votes |
/** * 分页插件 * @return PaginationInterceptor */ @Bean @ConditionalOnMissingBean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #24
Source File: MybatisPlusConfig.java From admin-plus with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #25
Source File: SmartMybatisPlusConfig.java From smart-admin with MIT License | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { // 开启 count 的 join 优化,只针对 left join !!! return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true)); }
Example #26
Source File: MybatisPlusConfig.java From SENS with GNU General Public License v3.0 | 4 votes |
/** * mybatis-plus分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #27
Source File: MybatisPlusConfig.java From permission with MIT License | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #28
Source File: SpringbootmybatisplusApplication.java From code with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #29
Source File: MybatisPlusConfig.java From My-Blog-layui with Apache License 2.0 | 4 votes |
/** * 分页插件 */ @Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }
Example #30
Source File: MybatisPlusConfig.java From ruoyiplus with MIT License | 4 votes |
@Bean public PaginationInterceptor paginationInterceptor() { return new PaginationInterceptor(); }