Class GenericPropertySourceGenerator

java.lang.Object
io.micronaut.aot.core.codegen.AbstractCodeGenerator
io.micronaut.aot.std.sourcegen.GenericPropertySourceGenerator
All Implemented Interfaces:
AOTCodeGenerator

@Internal public class GenericPropertySourceGenerator extends AbstractCodeGenerator
A source generator which will generate a static PropertySource from a given configuration file, in order to substitute the dynamic loader with a static configuration. It works for any types of loaders and therefore needs to use reflection to instantiate them.
  • Field Details

    • ID

      public static final String ID
      See Also:
    • DESCRIPTION

      public static final String DESCRIPTION
      See Also:
    • TYPES_OPTION

      public static final Option TYPES_OPTION
    • BASE_ORDER_OPTION

      public static final Option BASE_ORDER_OPTION
    • RESOURCE_NAMES_OPTION

      public static final Option RESOURCE_NAMES_OPTION
    • YAML_GENERATION_OPTION

      public static final Option YAML_GENERATION_OPTION
    • YAML_PROPERTY_SOURCE_LOADER

      public static final String YAML_PROPERTY_SOURCE_LOADER
  • Constructor Details

    • GenericPropertySourceGenerator

      public GenericPropertySourceGenerator(AOTContext context, Collection<io.micronaut.context.env.ActiveEnvironment> environments)
      Create the generic property source generator from resource names. A resource name and environment will form a property source name e.g. application or application-test.
      Parameters:
      context - The AOT context to read properties from
      environments - The environments
  • Method Details

    • generate

      public void generate(@NonNull @NonNull AOTContext context)