Java Code Examples for com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize

The following examples show how to use com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize. These examples are extracted from open source projects. 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 Project: smart-admin   Source File: SmartMybatisPlusConfig.java    License: MIT License 4 votes vote down vote up
/**
 * 分页插件
 */
@Bean
public PaginationInterceptor paginationInterceptor() {
    // 开启 count 的 join 优化,只针对 left join !!!
    return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true));
}
 
Example 2
Source Project: cymbal   Source File: MybatisplusConfiguration.java    License: Apache License 2.0 4 votes vote down vote up
/**
 * Plugin of pagination.
 */
@Bean
public PaginationInterceptor paginationInterceptor() {
    return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true));
}