in spring-boot-project/spring-boot/src/main/java/org/springframework/boot/web/embedded/jetty/JettyWebServer.java [157:197]
public void start() throws WebServerException {
synchronized (this.monitor) {
if (this.started) {
return;
}
this.server.setConnectors(this.connectors);
if (!this.autoStart) {
return;
}
try {
this.server.start();
for (Handler handler : this.server.getHandlers()) {
handleDeferredInitialize(handler);
}
Connector[] connectors = this.server.getConnectors();
for (Connector connector : connectors) {
try {
connector.start();
}
catch (IOException ex) {
if (connector instanceof NetworkConnector) {
PortInUseException.throwIfPortBindingException(ex,
() -> ((NetworkConnector) connector).getPort());
}
throw ex;
}
}
this.started = true;
logger.info("Jetty started on port(s) " + getActualPortsDescription() + " with context path '"
+ getContextPath() + "'");
}
catch (WebServerException ex) {
stopSilently();
throw ex;
}
catch (Exception ex) {
stopSilently();
throw new WebServerException("Unable to start embedded Jetty server", ex);
}
}
}