abel533 / Mapper

Mybatis Common Mapper - Easy to use
https://mybatis.io
MIT License
7.32k stars 1.63k forks source link

java.lang.InstantiationException: tk.mybatis.mapper.provider.base.BaseSelectProvider #640

Open luxzhang opened 5 years ago

luxzhang commented 5 years ago

MapperScan 由mybatis的,改成了tk的。 但是还是不行。 image

wang007 commented 5 years ago

我也遇到了这个问题,怎么调整tk包的版本都不行,最后改了mybatis的starter包好了。我想问下,为什么tk会强依赖版本。

org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.0
kevin-zhang-awx commented 5 years ago

我也遇到了这个问题,怎么调整tk包的版本都不行,最后改了mybatis的starter包好了。我想问下,为什么tk会强依赖版本。

org.mybatis.spring.boot mybatis-spring-boot-starter 2.1.0

我也遇到了还没解决,请问你mapper版本是啥

kevin-zhang-awx commented 5 years ago

死磕了几个小时,原来是在配置类上的注解MapperScan错误,神坑 mybatis下有一个和mapper重名的注解,应该用第一个而不是第二个,用第二个编译也不回报错,就是执行的时候报错 tk.mybatis.spring.annotation.MapperScan org.mybatis.spring.annotation.MapperScan