Explain the difference between @autowired and @inject?
Autowired | Inject | |
---|---|---|
1. | Spring's legacy annotation | Available from Spring 3 onwards |
2. | Process to figure out dependencies of a bean | Standard annotation for DI |
3. | Contains 'required' attribute | Does not contain 'required' attribute |
BY Best Interview Question ON 18 Jan 2019