Why does Spring Boot discover but not instantiate a @Component?
问题 I have a Spring Boot application with the following structure com.package Application - annotated with @SpringBootApplication Configuration - annotated with @Configuration Component1 - annotated with @Component, constructor annotated with @Autowired com.package.subpackage Component2 - annotated with @Component, constructor annotated with @Autowired My application class is package com.package; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure