The simple question is: How can you change the Spring Boot application port with gradle?
Here are already listed a lot of correct answers if you are not using gradle. So for none gradle issues, please refere to this post.
gradleportspring-boot
The simple question is: How can you change the Spring Boot application port with gradle?
Here are already listed a lot of correct answers if you are not using gradle. So for none gradle issues, please refere to this post.
Best Answer
In case you don't want to add extra configuration to your Gradle scripts, you can achieve it by setting the
SERVER_PORT
environment variable:[UPDATE] Since Gradle 4.9, it's possible to pass arguments to
bootRun
without extra configuration: