Explain the difference between @autowired and @inject?
Answer / Ravinder Rawat
"@Autowired" is a Spring Framework annotation used for Dependency Injection in Java. It automatically injects the dependency based on the type matching between the field, method parameter, or constructor argument, with a bean in the Spring ApplicationContext.nnOn the other hand, "@Inject" is a generic Dependency Injection annotation that can be used in various Java frameworks including CDI (Contexts and Dependency Injection for the Java EE platform) and Google Guice. Spring Framework also supports @Inject but it's not as widely used as @Autowired because of its more verbose syntax and lesser integration with Spring."
| Is This Answer Correct ? | 0 Yes | 0 No |
Does spring boot require tomcat? : Spring Boot
What is stateful and stateless bean in spring?
What do you mean by beanfactory in spring?
What is the use of @qualifier in spring boot? : Spring Boot
What is spring security?
What is a spring mvc?
What is jpa and spring data jpa?
How struts application can be integrated with spring?
Explain what is spring mvc?
In how many ways, can one configure spring into an application?
What is spring framework beginner?
What is aop module?