Site icon NgDeveloper

Difference between @Inject and @Autowired

Difference between @Inject and @Autowired

This is one of the important interview question of spring / spring boot framework interviews. Auto-wiring is the great feature we got to wire our application dependencies spring way, but it can be done by both JSR annotation and spring provided annotation. It is important to know the difference between these both to make use of it effectively in real time use-cases.

@Inject:

 

@Autowired:

Exit mobile version