Expose primary flag on BeanDefinitionBuilder

Closes gh-23794
This commit is contained in:
Juergen Hoeller 2019-10-30 01:04:41 +01:00
parent dc59e50561
commit 248ad0fa79
1 changed files with 9 additions and 0 deletions

View File

@ -314,6 +314,15 @@ public final class BeanDefinitionBuilder {
return this;
}
/**
* Set whether this bean is a primary autowire candidate.
* @since 5.1.11
*/
public BeanDefinitionBuilder setPrimary(boolean primary) {
this.beanDefinition.setPrimary(primary);
return this;
}
/**
* Set the role of this definition.
*/