Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to specify a profile in a Micronaut application?

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.

like image 983
tomas lingotti Avatar asked Sep 16 '18 19:09

tomas lingotti


1 Answers

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

like image 150
Sascha Frinken Avatar answered Oct 27 '22 04:10

Sascha Frinken