指向pom中对mybatis依赖的引用错误问题,或者是mapper扫描,数据源配置
参考链接https://blog.csdn.net/Roker_966/article/details/106822022
我有两个地方配置了mapper的路径
启动类加了@MapperScan
@SpringBootApplication(exclude = DataSourceAutoConfiguration.class)
@ComponentScan(basePackages = {"com.atguigu"})
@MapperScan("com.atguigu.educenter.mapper")
public class UcenterApplication {
public static void main(String[] args) {
SpringApplication.run(UcenterApplication.class,args);
}
}
配置文件也加了
#配置mapper xml文件的路径
mybatis-plus.mapper-locations=classpath:com/atguigu/educenter/mapper/xml/*.xml
#mybatis日志
mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl
删掉一处就可以了
但是,还是没能解决
我后来也改了pom.xml,成功不再报错了
<dependencies>
<dependency&g