Spring Boot не удалось привязать сервер к неверному адресу 8080.
И сообщение по умолчанию:
Не удалось запустить веб-сервер. Порт 8080 уже используется
Вы можете попытаться установить
server.addresss=9090
, и вы получите то же сообщение.
Сообщение об ошибке просто вводит в заблуждение.
Сообщение генерируется в PortInUseFailureAnalyzer
И здесь выдается исключение PortInUseException:
public void start() throws WebServerException {
synchronized (this.monitor) {
if (this.started) {
return;
}
try {
addPreviouslyRemovedConnectors();
Connector connector = this.tomcat.getConnector();
if (connector != null && this.autoStart) {
performDeferredLoadOnStartup();
}
checkThatConnectorsHaveStarted();
this.started = true;
logger.info("Tomcat started on port(s): " + getPortsDescription(true) + " with context path '"
+ getContextPath() + "'");
}
catch (ConnectorStartFailedException ex) {
stopSilently();
throw ex;
}
catch (Exception ex) {
if (findBindException(ex) != null) {
throw new PortInUseException(this.tomcat.getConnector().getPort());
}
throw new WebServerException("Unable to start embedded Tomcat server", ex);
}
finally {
Context context = findContext();
ContextBindings.unbindClassLoader(context, context.getNamingToken(), getClass().getClassLoader());
}
}
}