Class UnsatisfiedDependencyException

All Implemented Interfaces:
Serializable

public class UnsatisfiedDependencyException extends BeanCreationException
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.
Since:
03.09.2003
Author:
Rod Johnson, Juergen Hoeller
See Also:
  • Constructor Details

    • UnsatisfiedDependencyException

      public UnsatisfiedDependencyException(@Nullable String resourceDescription, @Nullable String beanName, String propertyName, String 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
    • UnsatisfiedDependencyException

      public UnsatisfiedDependencyException(@Nullable String resourceDescription, @Nullable String beanName, String propertyName, BeansException 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
    • UnsatisfiedDependencyException

      public UnsatisfiedDependencyException(@Nullable String resourceDescription, @Nullable String beanName, @Nullable InjectionPoint injectionPoint, String msg)
      Create a new UnsatisfiedDependencyException.
      Parameters:
      resourceDescription - description of the resource that the bean definition came from
      beanName - the name of the bean requested
      injectionPoint - the injection point (field or method/constructor parameter)
      msg - the detail message
      Since:
      4.3
    • UnsatisfiedDependencyException

      public UnsatisfiedDependencyException(@Nullable String resourceDescription, @Nullable String beanName, @Nullable InjectionPoint injectionPoint, BeansException ex)
      Create a new UnsatisfiedDependencyException.
      Parameters:
      resourceDescription - description of the resource that the bean definition came from
      beanName - the name of the bean requested
      injectionPoint - the injection point (field or method/constructor parameter)
      ex - the bean creation exception that indicated the unsatisfied dependency
      Since:
      4.3
  • Method Details

    • getInjectionPoint

      @Nullable public InjectionPoint getInjectionPoint()
      Return the injection point (field or method/constructor parameter), if known.
      Since:
      4.3