-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
It should be easier to set which profile is active when running gradle
tasks
#832
Comments
It works after following the advice here: #592 Although, I think there should be a change made to the gradle plugin to make this the default. We want to be able to run specify that gradle should use the test profile, and we want to do that often. |
When you say "make this the default" what exactly does that mean? Does it amount to setting |
@dsyer I was intentionally leaving the solution up to you by being vague, but now that you ask... I'd put the configuration in the spring boot gradle plugin, so it is not something that the developer needs to think about. |
I set spring profile in a shell variable as was mentioned here, this is simple enough for me.
|
While the shell variable solution is great it still feels like this something missing from Spring boot, especially given it's close parity with Rails. |
Would be nice if you could set the profile in build.gradle cleanly such as
Seems like the best suggestion from #592 is:
|
adding |
#1176 will address this |
I really like @jklap 's suggestion, which is different than this request (and the ticket it was closed as a duplicate of):
Is that worth creating a separate issue for? |
Hello. |
The best way that a found was: just specificy what profile do you want and be happy. I hope that it works to another person. Cheers! |
Is there a way to specify profile when running |
When I run:
... my application does not start in the dev @Profile, and it should.
Here's my example project:
https://github.com/berlin-ab/springbootblog/tree/blog/profiles
The text was updated successfully, but these errors were encountered: