@Bean: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
 
Line 2: Line 2:


* [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Beans|Spring Dependency Injection and Inversion of Control Container Concepts]]
* [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Beans|Spring Dependency Injection and Inversion of Control Container Concepts]]
=Overview=
The @Bean annotation indicates that the object returned by the methods it annotates are [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Beans|beans]] and they should be added to the [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Application_Context|application context]]. By default, their respective [[Spring_Dependency_Injection_and_Inversion_of_Control_Container_Concepts#Bean_ID|bean IDs]] will be the same as the names of the methods that define them.

Revision as of 05:17, 10 October 2018

Internal

Overview

The @Bean annotation indicates that the object returned by the methods it annotates are beans and they should be added to the application context. By default, their respective bean IDs will be the same as the names of the methods that define them.