Spring Framework: Difference between revisions

Content deleted Content added
Zyvov (talk | contribs)
Autowiring: Fixed grammar and clarification
Zyvov (talk | contribs)
Creating and managing beans: Fixed grammar and Clarification
Line 101:
Objects created by the container are called managed objects or [[JavaBeans|beans]].{{sfn | Deinum | Rubio | Long | Mak | 2014 | loc=§2-16 Use Property Editors in Spring|pp=112-116}} The container can be configured by loading [[XML]] (Extensible Markup Language) files{{sfn | Deinum | Rubio | Long | Mak | 2014 | loc=§2-1 Manage and Configure POJOs with the Spring IoC Container | pp=48-52}}{{sfn | Johnson | Hoeller | 2004}}{{rp|pp=151–152}} or detecting specific [[Java annotation]]s on configuration classes. These data sources contain the bean definitions that provide the information required to create the beans.
 
The {{code|@Configuration}} is a Spring-specific annotation that marks a class as the configuration class. thatThe configuration class provides the beans to the Spring {{code|ApplicationContext}}.{{sfn|Walls|2019|loc=§1.1 Getting started with Spring - What is Spring|pp=4-6}} Each of the methods in the Spring configuration class is configured with the {{code|@Bean}} annotation,. which informs theThe {{code|ApplicationContext}} tointerface will then return the objects configured with the {{code|@Bean}} annotation as beans. The advantage of java-based configuration over XML-based configuration is better type safety and refactorability.{{sfn|Walls|2019|loc=§1.1 Getting started with Spring - What is Spring | pp=4-6}}
 
==== Types of Inversion of Control ====