org.springframework.context.annotation

Class AnnotationConfigApplicationContext

    • Constructor Detail

      • AnnotationConfigApplicationContext

        public AnnotationConfigApplicationContext()
        Create a new AnnotationConfigApplicationContext that needs to be populated through register(java.lang.Class<?>...) calls and then manually refreshed.
      • AnnotationConfigApplicationContext

        public AnnotationConfigApplicationContext(DefaultListableBeanFactory beanFactory)
        Create a new AnnotationConfigApplicationContext with the given DefaultListableBeanFactory.
        Parameters:
        beanFactory - the DefaultListableBeanFactory instance to use for this context
      • AnnotationConfigApplicationContext

        public AnnotationConfigApplicationContext(java.lang.Class<?>... annotatedClasses)
        Create a new AnnotationConfigApplicationContext, deriving bean definitions from the given annotated classes and automatically refreshing the context.
        Parameters:
        annotatedClasses - one or more annotated classes, e.g. @Configuration classes
      • AnnotationConfigApplicationContext

        public AnnotationConfigApplicationContext(java.lang.String... basePackages)
        Create a new AnnotationConfigApplicationContext, scanning for bean definitions in the given packages and automatically refreshing the context.
        Parameters:
        basePackages - the packages to check for annotated classes