Configuration Reference

Version:3.0.1-SNAPSHOT

Standard Optimizers

Warning
These are not configuration properties to add in your regular Micronaut configuration files, but properties to be added to the Micronaut AOT configuration, via your build plugin. Please refer to the appropriate Maven or Gradle plugin for more details.

Module cached.environment

This module is available in JIT and native modes.

Table 1. Configuration Properties for cached.environment

Property

Description

Example value

cached.environment.enabled

Enables this optimization: Caches environment property values: environment properties will be deemed immutable after application startup

true

Module deduce.environment

This module is available in JIT and native modes.

Table 2. Configuration Properties for deduce.environment

Property

Description

Example value

deduce.environment.enabled

Enables this optimization: Deduces the environment at build time instead of runtime

true

Module known.missing.types

This module is available in JIT and native modes.

Table 3. Configuration Properties for known.missing.types

Property

Description

Example value

known.missing.types.enabled

Enables this optimization: Checks for the existence of some types at build time instead of runtime

true

known.missing.types.list

A list of types that the AOT analyzer needs to check for existence (comma separated)

io.reactivex.Observable,​reactor.core.publisher.Flux,​kotlinx.coroutines.flow.Flow,​io.reactivex.rxjava3.core.Flowable,​io.reactivex.rxjava3.core.Observable,​io.reactivex.Single,​reactor.core.publisher.Mono,​io.reactivex.Maybe,​io.reactivex.rxjava3.core.Single,​io.reactivex.rxjava3.core.Maybe,​io.reactivex.Completable,​io.reactivex.rxjava3.core.Completable,​io.methvin.watchservice.MacOSXListeningWatchService,​io.micronaut.core.async.publisher.CompletableFuturePublisher,​io.micronaut.core.async.publisher.Publishers.JustPublisher,​io.micronaut.core.async.subscriber.Completable

Module logback.xml.to.java

This module is available in JIT and native modes.

Table 4. Configuration Properties for logback.xml.to.java

Property

Description

Example value

logback.xml.to.java.enabled

Enables this optimization: Replaces logback.xml with a pure Java configuration (Experimental)

true

Module netty.properties

This module is available in JIT and native modes.

Table 5. Configuration Properties for netty.properties

Property

Description

Example value

netty.properties.enabled

Enables this optimization: Defines some Netty system properties when starting the application which optimize startup times

true

netty.machine.id

The machine id used by Netty. By default, generates a random value at runtime. Set it to a fixed MAC address to override, or use the value 'netty' to disable the optimization and get it at runtime.

random

netty.process.id

The process id to use for Netty. Defaults to a random PID at runtime. Set it to a fixed value (not recommended) or use the value 'netty' to disable the optimization and get it at runtime.

random

Module precompute.environment.properties

This module is available in JIT and native modes.

Table 6. Configuration Properties for precompute.environment.properties

Property

Description

Example value

precompute.environment.properties.enabled

Enables this optimization: Precomputes Micronaut configuration property keys from the current environment variables

true

Module property-source-loader.generate

This module is available in JIT and native modes.

Table 7. Configuration Properties for property-source-loader.generate

Property

Description

Example value

property-source-loader.generate.enabled

Enables this optimization: Converts configuration files supplied by property source loaders to Java configuration

true

property-source-loader.types

The PropertySourceLoader classnames to use for generating property sources

io.micronaut.context.env.PropertiesPropertySourceLoader,​ io.micronaut.context.env.yaml.YamlPropertySourceLoader

property-source-loader.base-order

The base order to use for the generated property sources. Positive value will be added to base order for specific environments

-1073741824

property-source-loader.resource-names

The resource names to generate property sources for. By default, it is 'application,bootstrap'.

application,​bootstrap

property-source-loader.service-loader-exclude

Whether the property source loaders specified by types should be excluded in service loading

true

yaml.to.java.config.enabled

Deprecated option to enable the yaml property source generation. Use property-source-loader.types=io.micronaut.context.env.yaml.YamlPropertySourceLoader instead

false

Module scan.reactive.types

This module is available in JIT and native modes.

Table 8. Configuration Properties for scan.reactive.types

Property

Description

Example value

scan.reactive.types.enabled

Enables this optimization: Scans reactive types at build time instead of runtime

true

Module sealed.property.source

This module is available in JIT and native modes.

Table 9. Configuration Properties for sealed.property.source

Property

Description

Example value

sealed.property.source.enabled

Enables this optimization: Precomputes property sources at build time

true

Module graalvm.config

This module is available in native mode.

Table 10. Configuration Properties for graalvm.config

Property

Description

Example value

graalvm.config.enabled

Enables this optimization: Generates GraalVM configuration files required to load the AOT optimizations

true

service.types

The list of service types to be scanned (comma separated)

io.micronaut.Service1,​io.micronaut.Service2