Can anyone explain what a Spring Framework bean is?

0

Can anyone simplify what is a bean? I've read the description on Spring's own website but it did not make much sense to me what it actually is, and what it actually does.

I know I have to set it up in spring-context.xml, but I do not know exactly why, or what's actually happening, I want to understand which need to declare this Bean is sup- plying.

Hugs and thanks in advance. rs

    
asked by anonymous 12.04.2018 / 00:20

1 answer

1

A bean is an object that is created, managed and destroyed by the spring container, the framework is fully responsible for this object, creating, injecting its properties (dependency injection). We can inject this object in the container (spring application) through declarations in the xml (in this case, spring-context.xml) or through annotation, in this way we use the inversion of control (IoC) . I do not know if it gets understood. Big hug.

For more information, see Inversion of Control .

    
12.04.2018 / 18:30