DEV Community

MAYUR KUMBHAR
MAYUR KUMBHAR

Posted on

Spring Beans 🫘& Context

Bean

A java class which is maintained by the spring framework, it is called as Bean in spring. Its fundamental building block of spring framework.

How spring knows which class maintain as Bean?

We can configures the beans using the annotations or XML configurations in spring. Based on configurations available spring container instantiates and assembles them to become bean in spring. IoC container help to maintain the lifecycle of the beans.

Spring Context

Context is memory location of web application in which all the objects instantiated by the framework are present and managed by the context framework.
By default spring dose not know all the objects in the application, based on the configuration spring will instantiate & maintain the object during the initialization so all the information related to those object is available inside spring context.

If object dose not available in spring context then spring dose not know about the object.

SpEL - spring expression language

It is the expression language provided by the spring framework to perform the operations such as manipulating object graph like setting, getting property values, property assignments & method invocations etc.

Top comments (0)