abel533 / MyBatis-Spring-Boot

Spring Boot集成MyBatis的基础项目
3.37k stars 1.59k forks source link

mapper-spring-boot-starter 升级到1.2.0以后,Example执行报错 #98

Open feiguzi opened 6 years ago

feiguzi commented 6 years ago

debug的时候MapperScannerConfigurer.postProcessBeanDefinitionRegistry 没有执行,退回版本可以用

Cicinnus0407 commented 6 years ago

我的mapperScan导包用这个 tk.mybatis.spring.annotation.MapperScan 下的就可以了...弄了一个钟,心累

abel533 commented 6 years ago

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 {

}