Closed llyboy closed 2 years ago
我也一样
新版本启动中增加 banner, 需要日志级别 debug,可以通过 -Dpagehelper.banner=false
或者环境变量 PAGEHELPER_BANNER=false
关闭:
DEBUG [main] -
,------. ,--. ,--. ,--.
| .--. ' ,--,--. ,---. ,---. | '--' | ,---. | | ,---. ,---. ,--.--.
| '--' | ' ,-. | | .-. | | .-. : | .--. | | .-. : | | | .-. | | .-. : | .--'
| | --' \ '-' | ' '-' ' \ --. | | | | \ --. | | | '-' ' \ --. | |
`--' `--`--' .`- / `----' `--' `--' `----' `--' | |-' `----' `--'
`---' `--' is intercepting.
通过这个输出可以看到分页插件配置了几次,默认只会输出一次。。
如果出现了多次,可以在 PageInterceptor
构造方法断点看看那些地方进行了实例化。
异常模板
使用环境
SQL 解析错误
分页参数
原 SQL
期望的结果:
完整异常信息
|2019-12-09 20:33:19.412|ERROR|jobSequenceSettlementAuthTask_Worker-1|com.epay.fcc.fses.settlement.service.impl.auth.AbstractAuthBizService:149||||||||process channel data is error, error reason==>| org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置!
Cause: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置!
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置!
Cause: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置!
Caused by: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置! at com.github.pagehelper.PageHelper.skip(PageHelper.java:55) ~[pagehelper-5.1.2.jar:?] at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:92) ~[pagehelper-5.1.2.jar:?] at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.4.5.jar:3.4.5] at com.sun.proxy.$Proxy191.query(Unknown Source) ~[?:?] at com.github.pagehelper.PageInterceptor.executeAutoCount(PageInterceptor.java:201) ~[pagehelper-5.1.2.jar:?] at com.github.pagehelper.PageInterceptor.intercept(PageInterceptor.java:113) ~[pagehelper-5.1.2.jar:?] at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:61) ~[mybatis-3.4.5.jar:3.4.5] at com.sun.proxy.$Proxy191.query(Unknown Source) ~[?:?] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:148) ~[mybatis-3.4.5.jar:3.4.5] at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.4.5.jar:3.4.5] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181] at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:433) ~[mybatis-spring-1.3.1.jar:1.3.1] ... 38 more
Caused by: java.lang.RuntimeException: 在系统中发现了多个分页插件,请检查系统配置!
其他类型的错误
spring boot 2.0.1 只配置了
分页插件
pagehelper: helperDialect: oracle reasonable: true supportMethodsArguments: false pageSizeZero: true params: count=countSql 一直报上面错误:在系统中发现了多个分页插件,请检查系统配置!
功能建议
详细说明,尽可能提供(伪)代码示例。