解决main No MyBatis mapper was found in 的警告

在集成Spring + mybaits时出现以下警告

org.mybatis.spring.mapper.MapperScannerConfigurer$Scanner.main No MyBatis mapper was found in 'com.***.dao.impl' package. Please check your configuration.

出现以上情况是因为你的配置文件写多了这一段,

java 复制代码
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.lanyuan.dao.impl" />
	</bean> 

亲爱吊丝们,把它删除吧!

原因:是

org.mybatis.spring.mapper.MapperScannerConfigurer是扫描仓储类的接口,我不是用接口方式实现管理的.所把那段删除便可!

相关推荐
luteres5 小时前
Mybatis+SSM整合笔记
java·开发语言·mybatis
晚染烟14 小时前
每日八股day31
mybatis
MetaLite2 天前
MyBatis复杂SQL很灵活-自研ORM为何仍要保留SQL逃生口
java·mybatis
步行cgn2 天前
MyBatis 实现分页查询
mybatis
山甫aa2 天前
Javaweb---MyBatis增删改查
java·数据库·后端·mybatis·springboot
choumou_M2 天前
SpringBoot_2:MyBatis-Generator插件使用教程
spring boot·tomcat·mybatis
SQL-First布道者2 天前
全面解构传统持久层框架,拥抱真正的 SQL-First
java·数据库·spring boot·sql·spring·mybatis·spring jdbc
晚安code4 天前
MyBatis-Plus 分页插件与字段自动填充:两行配置告别 CRUD 重复劳动
mybatis