Interface ApplicationContextConfigurer

All Superinterfaces:
io.micronaut.core.order.Ordered

public interface ApplicationContextConfigurer extends io.micronaut.core.order.Ordered
An application context configurer is responsible for configuring an application context before the application/function is started.

Application context configurers must be registered as services. Those services are automatically called whenever a new application context builder is created.

An application context annotated with ContextConfigurer will automatically be registered as a service provider.

Since:
3.2
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    A default configurer which does nothing.

    Fields inherited from interface io.micronaut.core.order.Ordered

    HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    configure(@NonNull ApplicationContext applicationContext)
    Configures the application context.
    default void
    Configures the application context builder.

    Methods inherited from interface io.micronaut.core.order.Ordered

    getOrder
  • Field Details

  • Method Details

    • configure

      default void configure(@NonNull @NonNull ApplicationContextBuilder builder)
      Configures the application context builder.

      This method allows the programmatic enhancement of the context prior to construction.

      The ApplicationContextBuilder interface features methods to add environments, property sources etc.

      Parameters:
      builder - the builder to configure
      See Also:
    • configure

      default void configure(@NonNull @NonNull ApplicationContext applicationContext)
      Configures the application context.

      This method will be called after the context is fully configured but prior to starting the context.

      Parameters:
      applicationContext - The context.
      Since:
      4.5.0