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

The following examples show how to use com.baomidou.mybatisplus.extension.plugins.pagination.optimize.JsqlParserCountOptimize. 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: SmartMybatisPlusConfig.java    From smart-admin with 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 File: MybatisplusConfiguration.java    From cymbal with Apache License 2.0 4 votes vote down vote up
/**
 * Plugin of pagination.
 */
@Bean
public PaginationInterceptor paginationInterceptor() {
    return new PaginationInterceptor().setCountSqlParser(new JsqlParserCountOptimize(true));
}