クラス NoUniqueBeanDefinitionException
java.lang.ObjectSE
java.lang.ThrowableSE
java.lang.ExceptionSE
java.lang.RuntimeExceptionSE
org.springframework.core.NestedRuntimeException
org.springframework.beans.BeansException
org.springframework.beans.factory.NoSuchBeanDefinitionException
org.springframework.beans.factory.NoUniqueBeanDefinitionException
- 実装されたすべてのインターフェース:
SerializableSE
一致する Bean が 1 つしか期待されていない場合に、複数の一致する候補が見つかった Bean インスタンスを
BeanFactory
に要求すると、例外がスローされます。- 導入:
- 3.2.1
- 作成者:
- Juergen Hoeller, Stephane Nicoll
- 関連事項:
コンストラクターのサマリー
コンストラクター説明NoUniqueBeanDefinitionException
(ClassSE<?> type, int numberOfBeansFound, StringSE message) 新しいNoUniqueBeanDefinitionException
を作成します。NoUniqueBeanDefinitionException
(ClassSE<?> type, StringSE... beanNamesFound) 新しいNoUniqueBeanDefinitionException
を作成します。NoUniqueBeanDefinitionException
(ClassSE<?> type, CollectionSE<StringSE> beanNamesFound) 新しいNoUniqueBeanDefinitionException
を作成します。NoUniqueBeanDefinitionException
(ClassSE<?> type, CollectionSE<StringSE> beanNamesFound, StringSE message) 新しいNoUniqueBeanDefinitionException
を作成します。NoUniqueBeanDefinitionException
(ResolvableType type, StringSE... beanNamesFound) 新しいNoUniqueBeanDefinitionException
を作成します。NoUniqueBeanDefinitionException
(ResolvableType type, CollectionSE<StringSE> beanNamesFound) 新しいNoUniqueBeanDefinitionException
を作成します。方法の概要
修飾子と型メソッド説明一致する Bean が 1 つだけであると予想されたときに見つかったすべての Bean の名前を返します。int
一致する Bean が 1 つだけであると予想されたときに見つかった Bean の数を返します。クラス org.springframework.beans.factory.NoSuchBeanDefinitionException から継承されたメソッド
getBeanName, getBeanType, getResolvableType
クラス org.springframework.core.NestedRuntimeException から継承されたメソッド
contains, getMostSpecificCause, getRootCause
クラス java.lang.ThrowableSE から継承されたメソッド
addSuppressedSE, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCauseSE, printStackTrace, printStackTraceSE, printStackTraceSE, setStackTraceSE, toString
コンストラクターの詳細
NoUniqueBeanDefinitionException
public NoUniqueBeanDefinitionException(ClassSE<?> type, CollectionSE<StringSE> beanNamesFound, StringSE message) 新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型beanNamesFound
- 一致するすべての Bean の名前 (コレクションとして)message
- 問題を説明する詳細なメッセージ- 導入:
- 6.2
NoUniqueBeanDefinitionException
新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型numberOfBeansFound
- 一致する Bean の数message
- 問題を説明する詳細なメッセージ
NoUniqueBeanDefinitionException
新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型beanNamesFound
- 一致するすべての Bean の名前 (コレクションとして)
NoUniqueBeanDefinitionException
新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型beanNamesFound
- 一致するすべての Bean の名前 (配列として)
NoUniqueBeanDefinitionException
新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型beanNamesFound
- 一致するすべての Bean の名前 (コレクションとして)- 導入:
- 5.1
NoUniqueBeanDefinitionException
新しいNoUniqueBeanDefinitionException
を作成します。- パラメーター:
type
- 非固有 Bean の必須型beanNamesFound
- 一致するすべての Bean の名前 (配列として)- 導入:
- 5.1
メソッドの詳細
getNumberOfBeansFound
public int getNumberOfBeansFound()一致する Bean が 1 つだけ期待されたときに見つかった Bean の数を返します。NoUniqueBeanDefinitionException の場合、これは通常 1 より大きくなります。getBeanNamesFound
一致する Bean が 1 つだけ期待されたときに見つかったすべての Bean の名前を返します。構築時に指定されていない場合、これはnull
になる可能性があることに注意してください。- 導入:
- 4.3
- 関連事項: