Spring Framework: Difference between revisions

Content deleted Content added
Cloud899 (talk | contribs)
 
(One intermediate revision by one other user not shown)
Line 25:
! Version
! Date
! Notes
|-
| 0.9 || 2003 ||
|-
| 1.0 || March 24, 2004 || First production release.
|-
| 2.0 || 2006 ||
|-
| 3.0 || 2009 ||
|-
| 4.0 || 2013 ||
|-
| 5.0 || 2017 ||
|-
| 6.0 || November 22, 2022 ||
|-
| 6.1 || November 16, 2023 ||
|-
| 6.2 || November 14, 2024 ||
|-
|}
Line 105 ⟶ 104:
There are several annotations that can be used for autowiring POJOs, including the Spring-specific annotation {{code|@Autowire}} (as well as several other Spring-specific annotations that help resolve autowire ambiguity such as the {{code|@Qualifier}} or {{code|@Primary}} annotations),{{sfn | Deinum | Long | Mak | Rubio | 2014 | loc=§3-3 Use POJO References and Auto-Wiring to Interact with other POJOs |pp=145-151}}{{sfn | Cosmina | Harrop | Schaefer | Ho | 2017 | loc=§3 Introducing IoC and DI in Spring - Autowiring Your Beans | pp=112-120 }} and the standard Java annotations {{code|@Resource}} and {{code|@Inject}}.{{sfn | Deinum | Long | Mak | Rubio | 2014 | loc=§3-4 Auto-wire POJOs the @Resource and @Inject annotation | pp=151-154}}
 
The {{code|@Qualifier}} annotation can be used on a class that defines a bean to inform Spring to prioritize the bean creation when autowiring it by '''name'''.{{sfn | Cosmina | Harrop | Schaefer | Ho | 2017 | loc=§3 Introducing IoC and DI in Spring - Autowiring Your Beans | pp=112-120 }}
 
The {{code|@Primary}} annotation can be used on a class that defines a bean to inform Spring to prioritize the bean creation when autowiring it by '''type'''.{{sfn | Cosmina | Harrop | Schaefer | Ho | 2017 | loc=§3 Introducing IoC and DI in Spring - Autowiring Your Beans | pp=112-120 }}
 
The {{code|@Resource}} annotation is an annotation that conforms to [[JSR 250]], or Common Annotations for the Java Platform, and is used for autowiring references to POJOs by '''name'''.{{sfn | Deinum | Long | Mak | Rubio | 2014 | loc=§3-4 Auto-wire POJOs the @Resource and @Inject annotation | pp=151-154}}

The {{code|@Inject}} annotation is an annotation that conforms to JSR 300, or Standard Annotations for injection, and is used for autowiring references to POJOs by '''type'''.{{sfn | Deinum | Long | Mak | Rubio | 2014 | loc=§3-4 Auto-wire POJOs the @Resource and @Inject annotation | pp=151-154}}
 
===Aspect-oriented programming framework===