ReactiveWebServerApplicationContext that accepts annotated classes as input -
in particular
@Configuration-annotated
classes, but also plain @Component classes and JSR-330 compliant
classes using javax.inject annotations. Allows for registering classes one by
one (specifying class names as config location) as well as for classpath scanning
(specifying base packages as config location).
Note: In case of multiple @Configuration classes, later @Bean
definitions will override ones defined in earlier loaded files. This can be leveraged
to deliberately override certain bean definitions via an extra Configuration class.
scopeMetadataResolver - the scope metadata resolver
register
public final void register(Class<?>... annotatedClasses)
Register one or more annotated classes to be processed. Note that
ReactiveWebServerApplicationContext.refresh() must be called in order for the context to fully process the new
class.
Calls to #register are idempotent; adding the same annotated class more
than once has no additional effect.