Spring bean

An object that the Spring container creates, configures and manages, and can inject into other beans.

In more detail

Classes become beans through annotations such as @Service or @RestController, or through configuration methods. The container resolves each bean's dependencies, runs its lifecycle callbacks, and by default shares one instance per application. Beans should be stateless unless their scope says otherwise.

Related terms

Taught in

References