Spring boot + Mybatis 用@Mapper注解无法注入Bean
学如逆水行舟,不进则退
·
报错:
***************************
APPLICATION FAILED TO START
***************************
Description:
Field userDao in com.sunlala.manage.impl.UserServiceManageImpl required a bean of type 'com.sunlala.dao.UserDao' that could not be found.
Action:
解决办法加入依赖:
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
原因Spring无法识别mybatis的注解,所以需要引入依赖包
更多推荐
已为社区贡献2条内容
所有评论(0)