Grokking Spring Boot
0% completed
What the Main Annotation Does
@SpringBootConfiguration @EnableAutoConfiguration @ComponentScan public class BookingApplication { public static void main(String[] args) { SpringApplication.run(BookingApplication.class, args); } }
We removed @SpringBootApplication from the booking service and wrote these three annotations in its place. The service started as before, GET /hello answered, and the container held 147 beans, the same number it held with the single annotation.
The two versions behave the same because they are the same
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%