I am new to Spring boot application. I wanted to understand how the Spring boot application creates beans without the @Configuration class. I looked at an example project in which there were neither @Bean definitions, nor component scans, but @Autowired, subject to the class dependency. Please view the snippet below:
@RestController public class RestController{ **@Autowired public CertificationService certificationService;** . . . . }
My limited knowledge of springs tells me that when there is an @Service annotation over a class, there should be an @ComponentScan somewhere to create a bean. But without scanning the components, how is the CertificationServiceImpl bean created, and does the CertificationService outsourcing in the RestController work here?
java spring spring-boot
Chandan
source share