使用spring+Mybatis報錯org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseSelectProvider.dynamicSQL). Cause: java.lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseSelectProvider
具体如下:
SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1e5f4cdb] was not registered for synchronization because synchronization is not active
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@1e5f4cdb]
2020-10-01 15:32:47.697 ERROR 14908 — [nio-9002-exec-1] c.t.c.exception.GlobalExceptionHandler : 【 请求线程:{},捕获到Exception系统异常 】
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseSelectProvider.dynamicSQL). Cause: java.lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseSelectProvider
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77) ~[mybatis-spring-1.3.2.jar:1.3.2]
at org.mybatis.spring.SqlSessionTemplate S q l S e s s i o n I n t e r c e p t o r . i n v o k e ( S q l S e s s i o n T e m p l a t e . j a v a : 446 ) [ m y b a t i s − s p r i n g − 1.3.2. j a r : 1.3.2 ] a t c o m . s u n . p r o x y . SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) ~[mybatis-spring-1.3.2.jar:1.3.2] at com.sun.proxy. SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446) [mybatis−spring−1.3.2.jar:1.3.2]atcom.sun.proxy.Proxy140.selectList(Unknown Source) ~[na:na]
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:230) ~[mybatis-spring-1.3.2.jar:1.3.2]
at com.baomidou.mybatisplus.core.override.PageMapperMethod.executeForMany(PageMapperMethod.java:173) ~[mybatis-plus-core-3.0.7.1.jar:3.0.7.1]
at com.baomidou.mybatisplus.core.override.PageMapperMethod.execute(PageMapperMethod.java:86) ~[mybatis-plus-core-3.0.7.1.jar:3.0.7.1]
at com.baomidou.mybatisplus.core.override.PageMapperProxy.invoke(PageMapperProxy.java:64) ~[mybatis-plus-core-3.0.7.1.jar:3.0.7.1]
at com.sun.proxy. P r o x y 141. s e l e c t A l l ( U n k n o w n S o u r c e ) [ n a : n a ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e 0 ( N a t i v e M e t h o d ) [ n a : 1.8. 0 2 0 ] a t s u n . r e f l e c t . N a t i v e M e t h o d A c c e s s o r I m p l . i n v o k e ( N a t i v e M e t h o d A c c e s s o r I m p l . j a v a : 62 ) [ n a : 1.8. 0 2 0 ] a t s u n . r e f l e c t . D e l e g a t i n g M e t h o d A c c e s s o r I m p l . i n v o k e ( D e l e g a t i n g M e t h o d A c c e s s o r I m p l . j a v a : 43 ) [ n a : 1.8. 0 2 0 ] a t j a v a . l a n g . r e f l e c t . M e t h o d . i n v o k e ( M e t h o d . j a v a : 483 ) [ n a : 1.8. 0 2 0 ] a t o r g . s p r i n g f r a m e w o r k . a o p . s u p p o r t . A o p U t i l s . i n v o k e J o i n p o i n t U s i n g R e f l e c t i o n ( A o p U t i l s . j a v a : 344 ) [ s p r i n g − a o p − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . i n v o k e J o i n p o i n t ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 198 ) [ s p r i n g − a o p − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . a o p . f r a m e w o r k . R e f l e c t i v e M e t h o d I n v o c a t i o n . p r o c e e d ( R e f l e c t i v e M e t h o d I n v o c a t i o n . j a v a : 163 ) [ s p r i n g − a o p − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . d a o . s u p p o r t . P e r s i s t e n c e E x c e p t i o n T r a n s l a t i o n I n t e r c e p t o r . i n v o k e ( P e r s i s t e n c e E x c e p t i o n T r a n s l a t i o n I n t e r c e p t o r . j a v a : 139 ) [ s p r i n g − t x − 5.2.2. R E L E A S E . j a r : 5.2.2. R E L E A S E ] a t o r g . s p r i n g f r a m e w o r k . a o p