What are beans in spring?



What are beans in spring?..

Answer / Rizwan Ali

In Spring Framework, a bean is an object that is managed by the Spring IoC container. Beans can be defined using XML configuration files (applicationContext.xml) or Java-based annotations (@Component, @Service, @Repository, etc.). Once registered as a bean, the IoC container is responsible for creating and managing the lifecycle of the bean.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Spring Framework Interview Questions

What are the types of springs?

1 Answers  


What is the difference between mvc and spring mvc?

1 Answers  


Why is spring boot so popular? : Spring Boot

1 Answers  


What are the types of dependency injection?

1 Answers  


What are the minimum configurations needed to create a spring mvc application?

1 Answers  


What is the difference between singleton and prototype bean?

1 Answers  


Is spring a link?

1 Answers  


What exactly is dependency injection in spring?

1 Answers  


What are different bean scopes in spring?

1 Answers  


What is the function of model attribute annotation?

1 Answers  


What is the scope of spring?

1 Answers  


What is difference between @autowired and @resource in spring?

1 Answers  


Categories