Field communityMapper in com.estate.service.impl.CommunityServiceImpl required a bean of type ‘


APPLICATION FAILED TO START


Description:

Field communityMapper in com.estate.service.impl.CommunityServiceImpl required a bean of type ‘com.estate.dao.CommunityMapper’ 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.estate.dao.CommunityMapper’ in your configuration.

Process finished with exit code 1

报错原因:

在这里插入图片描述

解决办法:

加一个MapperScan注解就行

如图:

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/weixin_45046181/article/details/120619620