Skip to content

Commit 4495187

Browse files
committed
Introduce accessors for allowCircularReferences/allowRawInjectionDespiteWrapping
Closes gh-27289
1 parent 77a562d commit 4495187

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,15 @@ public void setAllowCircularReferences(boolean allowCircularReferences) {
246246
this.allowCircularReferences = allowCircularReferences;
247247
}
248248

249+
/**
250+
* Return whether to allow circular references between beans.
251+
* @since 5.3.10
252+
* @see #setAllowCircularReferences
253+
*/
254+
public boolean isAllowCircularReferences() {
255+
return this.allowCircularReferences;
256+
}
257+
249258
/**
250259
* Set whether to allow the raw injection of a bean instance into some other
251260
* bean's property, despite the injected bean eventually getting wrapped
@@ -264,6 +273,15 @@ public void setAllowRawInjectionDespiteWrapping(boolean allowRawInjectionDespite
264273
this.allowRawInjectionDespiteWrapping = allowRawInjectionDespiteWrapping;
265274
}
266275

276+
/**
277+
* Return whether to allow the raw injection of a bean instance.
278+
* @since 5.3.10
279+
* @see #setAllowRawInjectionDespiteWrapping
280+
*/
281+
public boolean isAllowRawInjectionDespiteWrapping() {
282+
return this.allowRawInjectionDespiteWrapping;
283+
}
284+
267285
/**
268286
* Ignore the given dependency type for autowiring:
269287
* for example, String. Default is none.

0 commit comments

Comments
 (0)