Reputation: 1471
I'm running spring boot app with mvn command line. how can I active the specified spring profile? I tried this but with no luck:
mvn spring-boot:run -Drun.arguments="some parameters" -Dspring.profiles.active=schedule
Upvotes: 1
Views: 1072
Reputation: 47865
Use run.profiles
, for example:
mvn spring-boot:run -Drun.arguments="some parameters" -Drun.profiles=schedule
More details in the docs:
The active profiles to use for a particular application can be specified using the profiles argument
The profiles to enable can be specified on the command line as well
Upvotes: 1