在跑大佬微服例程中,在microservice-provider微服需要引用microservice-com微服中User bean,运行provider时出现以下报错,看到评论也有相同错误,故做下记录。
Description:
Field userDao in com.lzj.springcloud.service.impl.UserServiceImpl required a bean of type 'com.lzj.springcloud.dao.UserDao' that could not be found.
Action:
Consider defining a bean of type 'com.lzj.springcloud.dao.UserDao' in your configuration.
1.注意在UserDao接口上添加Mapper注解
2.把之前的parent父工程和com工程全部重新mvn clean 和install,之后再把provider服务按步骤执行就可以了。(我的问题是这样)