解决SpringBoot项目中PageHelper插件不生效

阅读 47

2022-03-15

创建PageHelper插件类

@Component
@Intercepts({
  @Signature(
    type = org.apache.ibatis.executor.Executor.class,
    method = "query",
    args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class}
  ),
  @Signature(
    type = org.apache.ibatis.executor.Executor.class,
    method = "query",
    args = {MappedStatement.class, Object.class, RowBounds.class, ResultHandler.class, CacheKey.class, BoundSql.class}
  )
})
public class MyPlugin extends PageInterceptor{}

亲测有效

精彩评论(0)

0 0 举报