Commit 8c92a6a1 by Johannes Edmeier

update to latest snapshot of boot

parent 4c8196c5
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
<url>https://github.com/codecentric/spring-boot-admin/</url> <url>https://github.com/codecentric/spring-boot-admin/</url>
<properties> <properties>
<revision>2.0.0-SNAPSHOT</revision> <revision>2.0.0-SNAPSHOT</revision>
<spring-boot.version>2.0.0.RC1</spring-boot.version> <spring-boot.version>2.0.0.BUILD-SNAPSHOT</spring-boot.version>
<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version> <spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>
<hazelcast-tests.version>3.9.2</hazelcast-tests.version> <hazelcast-tests.version>3.9.2</hazelcast-tests.version>
<java.version>1.8</java.version> <java.version>1.8</java.version>
......
...@@ -226,10 +226,10 @@ public class DefaultApplicationFactory implements ApplicationFactory { ...@@ -226,10 +226,10 @@ public class DefaultApplicationFactory implements ApplicationFactory {
@EventListener @EventListener
public void onWebServerInitialized(WebServerInitializedEvent event) { public void onWebServerInitialized(WebServerInitializedEvent event) {
if ("server".equals(event.getServerId())) { String name = event.getApplicationContext().getServerNamespace();
if ("server".equals(name) || !StringUtils.hasText(name)) {
localServerPort = event.getWebServer().getPort(); localServerPort = event.getWebServer().getPort();
} } else if ("management".equals(name)) {
if ("management".equals(event.getServerId())) {
localManagementPort = event.getWebServer().getPort(); localManagementPort = event.getWebServer().getPort();
} }
} }
......
...@@ -26,10 +26,10 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointPr ...@@ -26,10 +26,10 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointPr
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints; import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.web.context.WebServerApplicationContext;
import org.springframework.boot.web.context.WebServerInitializedEvent; import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.boot.web.server.Ssl; import org.springframework.boot.web.server.Ssl;
import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServer;
import org.springframework.context.ApplicationContext;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatThrownBy; import static org.assertj.core.api.Assertions.assertThatThrownBy;
...@@ -194,24 +194,18 @@ public class DefaultApplicationFactoryTest { ...@@ -194,24 +194,18 @@ public class DefaultApplicationFactoryTest {
} }
private static class TestWebServerInitializedEvent extends WebServerInitializedEvent { private static class TestWebServerInitializedEvent extends WebServerInitializedEvent {
private final String serverId; private final WebServer server = mock(WebServer.class);
private final WebServer server; private final WebServerApplicationContext context = mock(WebServerApplicationContext.class);
private TestWebServerInitializedEvent(String serverId, int port) { private TestWebServerInitializedEvent(String name, int port) {
super(mock(WebServer.class)); super(mock(WebServer.class));
this.serverId = serverId;
this.server = mock(WebServer.class);
when(server.getPort()).thenReturn(port); when(server.getPort()).thenReturn(port);
when(context.getServerNamespace()).thenReturn(name);
} }
@Override @Override
public ApplicationContext getApplicationContext() { public WebServerApplicationContext getApplicationContext() {
return null; return context;
}
@Override
public String getServerId() {
return this.serverId;
} }
@Override @Override
......
...@@ -26,9 +26,9 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointPr ...@@ -26,9 +26,9 @@ import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointPr
import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties; import org.springframework.boot.actuate.autoconfigure.web.server.ManagementServerProperties;
import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints; import org.springframework.boot.actuate.endpoint.web.PathMappedEndpoints;
import org.springframework.boot.autoconfigure.web.ServerProperties; import org.springframework.boot.autoconfigure.web.ServerProperties;
import org.springframework.boot.web.context.WebServerApplicationContext;
import org.springframework.boot.web.context.WebServerInitializedEvent; import org.springframework.boot.web.context.WebServerInitializedEvent;
import org.springframework.boot.web.server.WebServer; import org.springframework.boot.web.server.WebServer;
import org.springframework.context.ApplicationContext;
import org.springframework.mock.web.MockServletContext; import org.springframework.mock.web.MockServletContext;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
...@@ -118,24 +118,18 @@ public class ServletApplicationFactoryTest { ...@@ -118,24 +118,18 @@ public class ServletApplicationFactoryTest {
} }
private static class TestWebServerInitializedEvent extends WebServerInitializedEvent { private static class TestWebServerInitializedEvent extends WebServerInitializedEvent {
private final String serverId; private final WebServer server = mock(WebServer.class);
private final WebServer server; private final WebServerApplicationContext context = mock(WebServerApplicationContext.class);
private TestWebServerInitializedEvent(String serverId, int port) { private TestWebServerInitializedEvent(String name, int port) {
super(mock(WebServer.class)); super(mock(WebServer.class));
this.serverId = serverId;
this.server = mock(WebServer.class);
when(server.getPort()).thenReturn(port); when(server.getPort()).thenReturn(port);
when(context.getServerNamespace()).thenReturn(name);
} }
@Override @Override
public ApplicationContext getApplicationContext() { public WebServerApplicationContext getApplicationContext() {
return null; return context;
}
@Override
public String getServerId() {
return this.serverId;
} }
@Override @Override
......
...@@ -18,4 +18,4 @@ management: ...@@ -18,4 +18,4 @@ management:
expose: "*" expose: "*"
endpoint: endpoint:
health: health:
show-details: true show-details: ALWAYS
...@@ -12,7 +12,7 @@ management: ...@@ -12,7 +12,7 @@ management:
expose: "*" expose: "*"
endpoint: endpoint:
health: health:
show-details: true show-details: ALWAYS
spring: spring:
application: application:
......
--- ---
info: info:
scm-url: "@scm.url@" scm-url: "@scm.url@"
build-url: "http://travis-ci.org/@env.TRAVIS_REPO_SLUG@/builds/@env.TRAVIS_BUILD_ID@" build-url: "http://travis-ci.org/@env.TRAVIS_REPO_SLUG@/builds/@env.TRxAVIS_BUILD_ID@"
logging: logging:
file: "target/boot-admin-sample-servlet.log" file: "target/boot-admin-sample-servlet.log"
...@@ -12,7 +12,7 @@ management: ...@@ -12,7 +12,7 @@ management:
expose: "*" expose: "*"
endpoint: endpoint:
health: health:
show-details: true show-details: ALWAYS
spring: spring:
application: application:
......
...@@ -12,4 +12,4 @@ management: ...@@ -12,4 +12,4 @@ management:
expose: "*" expose: "*"
endpoint: endpoint:
health: health:
show-details: true show-details: ALWAYS
\ No newline at end of file \ No newline at end of file
...@@ -52,8 +52,7 @@ public class AdminServerProperties { ...@@ -52,8 +52,7 @@ public class AdminServerProperties {
* If the path differs from the id you can specify this as id:path (e.g. health:ping). * If the path differs from the id you can specify this as id:path (e.g. health:ping).
*/ */
private String[] probedEndpoints = {"health", "env", "metrics", "httptrace:trace", "threaddump:dump", "jolokia", private String[] probedEndpoints = {"health", "env", "metrics", "httptrace:trace", "threaddump:dump", "jolokia",
"info", "info", "logfile", "refresh", "flyway", "liquibase", "heapdump", "loggers", "auditevents"};
"logfile", "refresh", "flyway", "liquibase", "heapdump", "loggers", "auditevents"};
public void setContextPath(String contextPath) { public void setContextPath(String contextPath) {
this.contextPath = PathUtils.normalizePath(contextPath); this.contextPath = PathUtils.normalizePath(contextPath);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment