Autowired(required=true)

时间:2022-04-16 23:03:19

问题原因

没有实现类的接口上添加了@Autowired注解

问题解决

删掉@Autowired注解

bug详情

Description:

Field userDAO in com.crab.service.serviceImpl.UserServiceImpl required a bean of type 'com.crab.dao.UserDAO' 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.crab.dao.UserDAO' in your configuration.