Friday, 17 March 2023

Micronaut Application configuration tutorial

In this tutorial series, I am going to explain how to configure application properties to a Micronaut application.

 

At the time of writing this post,

a.   Application configurations can be provided in Java properties, YAML, JSON, or Groovy files. By convention, following file names are used to define application configuration.

1.   application.yml,

2.   application.properties,

3.   application.json

4.   application.groovy

b.   You can override any property via environment variable or system property.

Micronaut: Define and read application properties
Micronaut: Specify the environment in command line
Specify Micronaut environment using MICRONAUT_ENVIRONMENTS environment variable
Customize Micronaut banner
Micronaut: property value placeholders usage in configuration files
Micronaut: Provide default values to a property value placeholder
Micronaut normalizes the properties into kebab case
Micronaut: working with random properties
Micronaut: inject configuration property using @Value annotation
Micronaut: Inject a property value using @property annotation
Micronaut: configure properties using @ConfigurationProperties annotation
Micronaut: Property type conversions
Micronaut: map a property to Duration
Micronaut: read list of values from application properties file
Micronaut: Readable bytes conversion
Micronaut: Format the configuration value to a date
Micronaut: MapFormat: Bind the properties to a map
Micronaut: Custom type converters
Micronaut: @EachProperty: Create a bean for each sub property
Micronaut: @EachProperty: list based binding of configuration properties
Micronaut: @EachBean, @EachProperty example
Micronaut: work with immutable configuration
Micronaut: Define immutable configuration using @ConfigurationProperties
Micronaut: Define immutable configuration using @ConfigurationInject annotation



Previous                                                    Next                                                    Home

No comments:

Post a Comment