0
Java Spring Boot Annotations and Dependencies
Hey everyone. I have a question about annotations in Spring Boot. Iâve never used them before, I know @Controller/@RestController, @RequestMapping/@GetMapping, but thatâs not enough to build a good functional web project using Spring Boot. What means the @Autowired annotation at all? I read about it a lot, but I donât understand how to use dependency injection still. So, the main thing I should learn is dependency injection perhaps?
1 RĂ©ponse
+ 2
The @Autowired annotation is used to inject the object dependency internally. You need not instantiate an object everytime using the 'new' keyword. This is generally achieved through either setter or constructor injection. The IoC container is responsible for creating and managing your objects.