Annotation Interface EnableMicronaut


@Retention(RUNTIME) @Target({TYPE,ANNOTATION_TYPE}) @Import(MicronautImportRegistrar.class) public @interface EnableMicronaut
Annotation that can be added to a Spring application case in the case where auto-configuration is disabled.
Since:
4.3.0
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static @interface 
    Used to allow to expose beans from the Spring to the Micronaut context.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines one or more types that represent Spring beans that should be exposed to the Micronaut context.
    A filter to apply to exclude or include specific bean types from being exposed as Spring beans.
  • Element Details

    • filter

      Class<? extends MicronautBeanFilter> filter
      A filter to apply to exclude or include specific bean types from being exposed as Spring beans.
      Returns:
      The bean filter
      Default:
      io.micronaut.spring.boot.starter.MicronautBeanFilter.class
    • exposeToMicronaut

      EnableMicronaut.ExposedBean[] exposeToMicronaut
      Defines one or more types that represent Spring beans that should be exposed to the Micronaut context.

      Note care should be taken that circular dependencies are not introduced between the Spring context and the Micronaut context

      Returns:
      The exposed bean.
      Default:
      {}