Which annotation in Spring is used to automate the wiring of bean dependencies?

  • @Autowired
  • @Bean
  • @Configuration
  • @Inject
In Spring, the @Autowired annotation is used to automate the wiring of bean dependencies. When applied to fields, constructors, or methods, it allows Spring to automatically inject the appropriate beans or dependencies, making the code more readable and reducing the need for manual wiring.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *