mapper-boot-starter icon indicating copy to clipboard operation
mapper-boot-starter copied to clipboard

升级到1.2.0版本发现的问题

Open asiamaster opened this issue 8 years ago • 1 comments

作者大大你好, 今天Mapper插件升级到了1.2.0,发现mapper.select(condtion)方法不能传入null参数查询所有了,能否看一下是什么原因呢?谢谢! 异常如下: 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 maven依赖如下: <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> 1.2.3 <groupId>tk.mybatis</groupId> <artifactId>mapper-spring-boot-starter</artifactId> 1.2.0

asiamaster avatar Jan 08 '18 09:01 asiamaster

Mapper-Starer 1.2.0 使用须知 使用1.2.0的时候需要满足下面三种情况之一

  1. 项目(间接)依赖中不包含官方的mybaitis-starter

  2. 使用tk提供的@MapperScan注解方式

  3. 在启动类上增加如下注解忽略

@EnableAutoConfiguration(
   exclude={org.mybatis.spring.boot.autoconfigure.MybatisAutoConfiguration.class})
public class Application {

}

abel533 avatar Jan 09 '18 13:01 abel533