Annotation Interface NoBeanOfType


@Target(METHOD) @Retention(RUNTIME) @Conditional(NoBeanOfTypeDefined.class) @Deprecated public @interface NoBeanOfType
Deprecated.
Use Spring Boot autoconfiguration or register the individual beans explicitly. Check the "See also" list for which individual beans to register.
Annotation to be used in a configuration class on @Bean annotated methods if the method should only provide its bean if a bean of a given type does not exist yet.
Since:
3.0
Author:
Allard Buijze
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Deprecated.
    Condition that checks if a bean with given class already exists in the Spring context.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated.
    The class of the bean to find in the Spring context.
  • Element Details

    • value

      Class<?> value
      Deprecated.
      The class of the bean to find in the Spring context. If a bean with that type already exists the annotated method will not also provide its bean.