What is the difference between @inject and @autowired?
Answer / Majid Ali Khan
@Inject and @Autowired are both used for dependency injection in Spring Framework, but they are part of different DI frameworks. @Inject comes from CDI (Contexts and Dependency Injection) and is used with Java EE applications, while @Autowired comes from Spring Framework.
| Is This Answer Correct ? | 0 Yes | 0 No |
What is context getbean?
What is meant by rmi?
Why do we use @override?
Does spring bean provide thread safety?
What is the use of @service in spring?
What are the types of advice?
What are the types of annotations?
What do you understand by dependency injection?
How many types of spring containers are there?
Why dependency injection is needed?
What is @resource in spring?
state the advantages of auto wiring?