Reputation: 9536
How to override spring boot properties at runtime?
Below command works fine in terminal
mvn spring-boot:run -Dspring-boot.run.arguments=--server.port=8081
but it's not working in Eclipse
-Dspring-boot.run.arguments=--server.port=8081
Upvotes: 1
Views: 2496
Reputation: 51
Use -Dserver.port=8081
as vm argument from run configuration of eclipse. It will work
Upvotes: 0
Reputation: 8001
You have two options.
server.port=8081
in application.properties file in spring boot application.-Dserver.port=8081
in VM arguments in eclipse as displayed in the image.Upvotes: 2