V.Vidyasagar
V.Vidyasagar

Reputation: 713

How to set active profile in application.yml of a Micronaut application?

I've the following config files in a Micronaut application -

How to set the active profile in application.yml? In Spring Boot this can be done by adding the property spring.profiles.active: "dev" in application.yml.

What is the equivalent of spring.profiles.active in Micronaut?

Upvotes: 1

Views: 3118

Answers (2)

Jeff Scott Brown
Jeff Scott Brown

Reputation: 27245

How to set the active profile in application.yml?

I don't think that is supported.

What is the equivalent of spring.profiles.active in Micronaut?

There isn't an exact equivalent. Probably the closest thing that we support is micronaut.environments.

Upvotes: 0

WorkaroundNewbie
WorkaroundNewbie

Reputation: 1141

we can use the environment which is available

java -Dmicronaut.environments=dev -jar myapp.jar

Please check this documentation https://docs.micronaut.io/latest/guide/index.html#environments

Upvotes: 1

Related Questions