Skip to content

Spring integration using Jetty opens a port event when server.port: -1 #5039

Open
@minwoox

Description

@minwoox

Spring integration using JettyService opens a port even when server.port: -1 is specified.
It's because JettyServletWebServerFactory sets the port with 0 when -1 is specfied.
https://github.com/spring-projects/spring-boot/blob/3e4a9f5204ee2fe989583b17b77d8dab8558282a/spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyServletWebServerFactory.java#L164-L166
We should override the getWebServer and fix it for consistent behavior with the Spring Tomcat integration.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions