/** * Create a new {@link AnnotationConfigReactiveWebServerApplicationContext}, scanning * for bean definitions in the given packages and automatically refreshing the * context. * @param basePackages the packages to check for annotated classes */ public AnnotationConfigReactiveWebServerApplicationContext(String... basePackages) { this(); scan(basePackages); refresh(); }
/** * Create a new {@link AnnotationConfigReactiveWebServerApplicationContext}, deriving * bean definitions from the given annotated classes and automatically refreshing the * context. * @param annotatedClasses one or more annotated classes, e.g. {@code @Configuration} * classes */ public AnnotationConfigReactiveWebServerApplicationContext( Class<?>... annotatedClasses) { this(); register(annotatedClasses); refresh(); }
private ConfigurableApplicationContext create() { AnnotationConfigReactiveWebServerApplicationContext context = new AnnotationConfigReactiveWebServerApplicationContext(); registerDemoApplication(context); context.register(AutoConfiguration.class); context.refresh(); return context; }