I want to specify different types of configs depending on the environment that I will deploy the app. Like in Spring-boot in the yml file we can set the profile, I want to know if there is a way to do it in Micronaut.
You can set active environment(s) either by system property micronaut.environments
(java -Dmicronaut.environments=foo,bar -jar myapp.jar
) or by environment variable MICRONAUT_ENVIRONMENTS
.
See Documentation: https://docs.micronaut.io/snapshot/guide/index.html#environments
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With