SpringBoot集成tk.mybatis

2019-05-16  本文已影响0人  鹅鹅鹅_

SpringBoot集成tk.mybatis报如下错

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.builder.BuilderException: Error invoking SqlProvider method (tk.mybatis.mapper.provider.base.BaseUpdateProvider.dynamicSQL).  Cause: java.lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseUpdateProvider

    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:77)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:446)

各种搜索,最终发现是maven多导入了包

      <!--<dependency>-->
            <!--<groupId>tk.mybatis</groupId>-->
            <!--<artifactId>mapper</artifactId>-->
            <!--<version>3.3.9</version>-->
        <!--</dependency>-->
        <dependency>
            <groupId>tk.mybatis</groupId>
            <artifactId>mapper-spring-boot-starter</artifactId>
            <version>2.0.2</version>
        </dependency>

相关文档

上一篇下一篇

猜你喜欢

热点阅读