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
Spring boot server port range support #9403
Conversation
@ishara Please sign the Contributor License Agreement! Click here to manually synchronize the status of this Pull Request. See the FAQ for frequently asked questions. |
@ishara Thank you for signing the Contributor License Agreement! |
Thanks for opening your first Spring Boot pull request. I see that you've used |
This is can not avoid, but if we can retry with until success with another port, seems acceptably. |
Unfortunately the issue we generally find with The way that The only way I can think of to support this would be to dig into the internals of Tomcat/Undertow/Jetty to see if it's possible to obtain and keep the server port directly. |
Thanks for the PR, but I think unfortunately we'll need to decline this in its current form for the above reasons. If you manage to find an alternative way to obtain the port please do open a new pull request. Thanks again! |
if
server.port
value is set to0
, the server port will automatically assigned.If we need to restrict automatic port to specific range value such as
8000
-9000
, the new settingserver.port-range
feature added.Please check
Thank you