What is the use of @bean in spring?



What is the use of @bean in spring?..

Answer / Himanshu Dwivedi

@Bean is a Spring Framework annotation used to declare that a method produces a bean (object) that should be managed by the Spring container. The container uses the information provided by the annotated methods for creating and configuring beans.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

Explain the concept of dispatcher servlet.

1 Answers  


What are beans in spring?

1 Answers  


What does mapping findforward () method return?

1 Answers  


How does dependency injection work and why would you need it?

1 Answers  


What is use of @component in spring?

1 Answers  


How to enable mvc annotations in spring?

1 Answers  


What is the scope of spring beans?

1 Answers  


Why is dao used?

1 Answers  


What are the ways to insert the collection concept in spring?

1 Answers  


What is dhcp pool?

1 Answers  


List in brief the new features spring 3.0 has to offer.

1 Answers  


How many types of advice are there in spring?

1 Answers  


Categories