Commit 8c92a6a1 by Johannes Edmeier

update to latest snapshot of boot

parent 4c8196c5
......@@ -27,7 +27,7 @@
<url>https://github.com/codecentric/spring-boot-admin/</url>
<properties>
<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>
<hazelcast-tests.version>3.9.2</hazelcast-tests.version>
<java.version>1.8</java.version>
......
......@@ -226,10 +226,10 @@ public class DefaultApplicationFactory implements ApplicationFactory {
@EventListener
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();
}
if ("management".equals(event.getServerId())) {
} else if ("management".equals(name)) {
localManagementPort = event.getWebServer().getPort();
}
}
......
......@@ -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.endpoint.web.PathMappedEndpoints;
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.server.Ssl;
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.assertThatThrownBy;
......@@ -194,24 +194,18 @@ public class DefaultApplicationFactoryTest {
}
private static class TestWebServerInitializedEvent extends WebServerInitializedEvent {
private final String serverId;
private final WebServer server;
private final WebServer server = mock(WebServer.class);
private final WebServerApplicationContext context = mock(WebServerApplicationContext.class);
private TestWebServerInitializedEvent(String serverId, int port) {
private TestWebServerInitializedEvent(String name, int port) {
super(mock(WebServer.class));
this.serverId = serverId;
this.server = mock(WebServer.class);
when(server.getPort()).thenReturn(port);
when(context.getServerNamespace()).thenReturn(name);
}
@Override
public ApplicationContext getApplicationContext() {
return null;
}
@Override
public String getServerId() {
return this.serverId;
public WebServerApplicationContext getApplicationContext() {
return context;
}
@Override
......
......@@ -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.endpoint.web.PathMappedEndpoints;
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.server.WebServer;
import org.springframework.context.ApplicationContext;
import org.springframework.mock.web.MockServletContext;
import static org.assertj.core.api.Assertions.assertThat;
......@@ -118,24 +118,18 @@ public class ServletApplicationFactoryTest {
}
private static class TestWebServerInitializedEvent extends WebServerInitializedEvent {
private final String serverId;
private final WebServer server;
private final WebServer server = mock(WebServer.class);
private final WebServerApplicationContext context = mock(WebServerApplicationContext.class);
private TestWebServerInitializedEvent(String serverId, int port) {
private TestWebServerInitializedEvent(String name, int port) {
super(mock(WebServer.class));
this.serverId = serverId;
this.server = mock(WebServer.class);
when(server.getPort()).thenReturn(port);
when(context.getServerNamespace()).thenReturn(name);
}
@Override
public ApplicationContext getApplicationContext() {
return null;
}
@Override
public String getServerId() {
return this.serverId;
public WebServerApplicationContext getApplicationContext() {
return context;
}
@Override
......
......@@ -18,4 +18,4 @@ management:
expose: "*"
endpoint:
health:
show-details: true
show-details: ALWAYS
......@@ -12,7 +12,7 @@ management:
expose: "*"
endpoint:
health:
show-details: true
show-details: ALWAYS
spring:
application:
......
---
info:
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:
file: "target/boot-admin-sample-servlet.log"
......@@ -12,7 +12,7 @@ management:
expose: "*"
endpoint:
health:
show-details: true
show-details: ALWAYS
spring:
application:
......
......@@ -12,4 +12,4 @@ management:
expose: "*"
endpoint:
health:
show-details: true
\ No newline at end of file
show-details: ALWAYS
\ No newline at end of file
......@@ -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).
*/
private String[] probedEndpoints = {"health", "env", "metrics", "httptrace:trace", "threaddump:dump", "jolokia",
"info",
"logfile", "refresh", "flyway", "liquibase", "heapdump", "loggers", "auditevents"};
"info", "logfile", "refresh", "flyway", "liquibase", "heapdump", "loggers", "auditevents"};
public void setContextPath(String 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