12

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.

Brian Tompsett - 汤莱恩
  • 5,195
  • 62
  • 50
  • 120
tomas lingotti
  • 151
  • 1
  • 7

1 Answers1

14

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

Sascha Frinken
  • 2,274
  • 1
  • 19
  • 23