// Injection of resource dependencies failed; nested exception is org.springframework.beans.
今天项目启动报错,最终发现两个类,用@resource注入,变量名一样导致了冲突,改了变量名就好了
//错误的情况
@Resource
private User user;
@Resource
private MyUser user;
//修改后
@Resourceprivate User user;
@Resourceprivate MyUser myUser;