SpringBoot集成MyBatis,显示找不到Mapper

***************************
APPLICATION FAILED TO START
***************************

Description:

Field tblUserMapper in com.example.springboot_mybatisdemo.service.Impl.TblUserServiceImpl required a bean of type 'com.example.springboot_mybatisdemo.dao.TblUserMapper' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)


Action:

Consider defining a bean of type 'com.example.springboot_mybatisdemo.dao.TblUserMapper' in your configuration.

解决办法,mapper接口上添加@Mapper注解

猜你喜欢

转载自blog.csdn.net/qq_42014192/article/details/88794384