org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘refereeFinaController’: Unsatisfied dependency expressed through field ‘sysOrgService’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘com.pfm.system.service.ISysOrgService’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
原因:
我的SpringBootApplication类扫描mapper包及其所有子包,sysOrgService所在包不在扫描范围内,则不会被扫描!
解决方法:
更改SpringBootApplication类扫描的范围