问题描述
报错原因:
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘com.ssm.test.JwtTest’: Unsatisfied dependency expressed through field ‘jwtHelper’: No qualifying bean of type ‘com.ssm.utils.JwtHelper’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
注入失败
原因分析:
1、检查要引入这个类有没有加入IOC容器中,类上有没有@Component注解之类的
2、检查启动类上包有没有扫描到@ComponentScan(“com.ssm.utils”)