Browse Source

Introduce accessors for allowCircularReferences/allowRawInjectionDespiteWrapping

Closes gh-27289
pull/27290/head
Juergen Hoeller 4 years ago
parent
commit
44951873f9
  1. 18
      spring-beans/src/main/java/org/springframework/beans/factory/support/AbstractAutowireCapableBeanFactory.java

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

@ -246,6 +246,15 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac @@ -246,6 +246,15 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
this.allowCircularReferences = allowCircularReferences;
}
/**
* Return whether to allow circular references between beans.
* @since 5.3.10
* @see #setAllowCircularReferences
*/
public boolean isAllowCircularReferences() {
return this.allowCircularReferences;
}
/**
* Set whether to allow the raw injection of a bean instance into some other
* bean's property, despite the injected bean eventually getting wrapped
@ -264,6 +273,15 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac @@ -264,6 +273,15 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
this.allowRawInjectionDespiteWrapping = allowRawInjectionDespiteWrapping;
}
/**
* Return whether to allow the raw injection of a bean instance.
* @since 5.3.10
* @see #setAllowRawInjectionDespiteWrapping
*/
public boolean isAllowRawInjectionDespiteWrapping() {
return this.allowRawInjectionDespiteWrapping;
}
/**
* Ignore the given dependency type for autowiring:
* for example, String. Default is none.

Loading…
Cancel
Save