pull/2553/head
Phillip Webb 10 years ago
parent 4895b15bec
commit b48e31d9d8

@ -263,7 +263,6 @@ public class SpringApplication {
* @return a running {@link ApplicationContext}
*/
public ConfigurableApplicationContext run(String... args) {
StopWatch stopWatch = new StopWatch();
stopWatch.start();
ConfigurableApplicationContext context = null;
@ -481,12 +480,10 @@ public class SpringApplication {
this.mainApplicationClass, System.out);
return;
}
if (this.banner != null) {
this.banner.printBanner(environment, this.mainApplicationClass, System.out);
return;
}
printBanner();
}

@ -1,5 +1,5 @@
/*
* Copyright 2012-2014 the original author or authors.
* Copyright 2012-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -49,10 +49,10 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
private static final Log logger = LogFactory
.getLog(UndertowEmbeddedServletContainer.class);
private final DeploymentManager manager;
private final Builder builder;
private final DeploymentManager manager;
private final String contextPath;
private final int port;
@ -86,6 +86,25 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
+ getPortsDescription());
}
private Undertow createUndertowServer() {
try {
HttpHandler servletHandler = this.manager.start();
this.builder.setHandler(getContextHandler(servletHandler));
return this.builder.build();
}
catch (ServletException ex) {
throw new EmbeddedServletContainerException(
"Unable to start embdedded Undertow", ex);
}
}
private HttpHandler getContextHandler(HttpHandler servletHandler) {
if (StringUtils.isEmpty(this.contextPath)) {
return servletHandler;
}
return Handlers.path().addPrefixPath(this.contextPath, servletHandler);
}
@SuppressWarnings("rawtypes")
private String getPortsDescription() {
try {
@ -111,25 +130,6 @@ public class UndertowEmbeddedServletContainer implements EmbeddedServletContaine
return String.valueOf(this.port);
}
private Undertow createUndertowServer() {
try {
HttpHandler servletHandler = this.manager.start();
this.builder.setHandler(getContextHandler(servletHandler));
return this.builder.build();
}
catch (ServletException ex) {
throw new EmbeddedServletContainerException(
"Unable to start embdedded Undertow", ex);
}
}
private HttpHandler getContextHandler(HttpHandler servletHandler) {
if (StringUtils.isEmpty(this.contextPath)) {
return servletHandler;
}
return Handlers.path().addPrefixPath(this.contextPath, servletHandler);
}
@Override
public synchronized void stop() throws EmbeddedServletContainerException {
if (this.started) {

Loading…
Cancel
Save