报告在无效 Spring Bean 的类中注入或自动装配的字段/方法: @Component@Service 等等。

示例:


public class FooBeanClass {
  @Autowired   // 报告“必须在有效 Spring Bean 中定义自动装配成员:@Component、@Service 等”
  ServiceBean bean;
  }