Exception thrown when a bean depends on other beans or simple properties
that were not specified in the bean factory definition, although
dependency checking was enabled.
Constructor: |
public UnsatisfiedDependencyException(String resourceDescription,
String beanName,
String propertyName,
String msg) {
super(resourceDescription, beanName,
"Unsatisfied dependency expressed through bean property '" + propertyName + "'" +
(msg != null ? ": " + msg : ""));
}
Create a new UnsatisfiedDependencyException. Parameters:
resourceDescription - description of the resource that the bean definition came from
beanName - the name of the bean requested
propertyName - the name of the bean property that couldn't be satisfied
msg - the detail message
|
public UnsatisfiedDependencyException(String resourceDescription,
String beanName,
String propertyName,
BeansException ex) {
this(resourceDescription, beanName, propertyName, (ex != null ? ": " + ex.getMessage() : ""));
initCause(ex);
}
Create a new UnsatisfiedDependencyException. Parameters:
resourceDescription - description of the resource that the bean definition came from
beanName - the name of the bean requested
propertyName - the name of the bean property that couldn't be satisfied
ex - the bean creation exception that indicated the unsatisfied dependency
|
public UnsatisfiedDependencyException(String resourceDescription,
String beanName,
int ctorArgIndex,
Class ctorArgType,
String msg) {
super(resourceDescription, beanName,
"Unsatisfied dependency expressed through constructor argument with index " +
ctorArgIndex + " of type [" + ClassUtils.getQualifiedName(ctorArgType) + "]" +
(msg != null ? ": " + msg : ""));
}
Create a new UnsatisfiedDependencyException. Parameters:
resourceDescription - description of the resource that the bean definition came from
beanName - the name of the bean requested
ctorArgIndex - the index of the constructor argument that couldn't be satisfied
ctorArgType - the type of the constructor argument that couldn't be satisfied
msg - the detail message
|
public UnsatisfiedDependencyException(String resourceDescription,
String beanName,
int ctorArgIndex,
Class ctorArgType,
BeansException ex) {
this(resourceDescription, beanName, ctorArgIndex, ctorArgType, (ex != null ? ": " + ex.getMessage() : ""));
initCause(ex);
}
Create a new UnsatisfiedDependencyException. Parameters:
resourceDescription - description of the resource that the bean definition came from
beanName - the name of the bean requested
ctorArgIndex - the index of the constructor argument that couldn't be satisfied
ctorArgType - the type of the constructor argument that couldn't be satisfied
ex - the bean creation exception that indicated the unsatisfied dependency
|