Spring Boot Annoatations
1. @Autowired Used for dependency injection (Spring automatically injects the required bean). By default, it matches by type. @Component class Engine { public String start() { return "Engine started"; } } @Component class Car { @Autowired private Engine engine; public void drive() { System.out.println(engine.start() + " - Car is driving"); } } @Component class…
