1 16 17 package org.springframework.beans.factory; 18 19 import org.springframework.util.ClassUtils; 20 21 30 public class UnsatisfiedDependencyException extends BeanCreationException { 31 32 41 public UnsatisfiedDependencyException( 42 String resourceDescription, String beanName, String propertyName, String msg) { 43 44 super(resourceDescription, beanName, 45 "Unsatisfied dependency expressed through bean property '" + propertyName + "'" + 46 (msg != null ? ": " + msg : "")); 47 } 48 49 60 public UnsatisfiedDependencyException( 61 String resourceDescription, String beanName, int ctorArgIndex, Class ctorArgType, String msg) { 62 63 super(resourceDescription, beanName, 64 "Unsatisfied dependency expressed through constructor argument with index " + 65 ctorArgIndex + " of type [" + ClassUtils.getQualifiedName(ctorArgType) + "]" + 66 (msg != null ? ": " + msg : "")); 67 } 68 69 } 70 | Popular Tags |