Commit caf44221 by Johannes Edmeier

Move Spring Cloud dependent stuff to new module

In order to do a relaease not waiting for Spring Cloud Finchley.REALEASE move all depedent stuff into a seperate module which can be excluded during build
parent ec449eeb
......@@ -11,12 +11,11 @@ cache:
before_install:
- 'if [[ -n "$DECRYPT_KEYPHRASE" ]]; then openssl aes-256-cbc -d -pass "env:DECRYPT_KEYPHRASE" -in .gnupg.tar.enc | tar xv; fi'
- 'if [[ ${TRAVIS_TAG} != "" ]]; then ./mvnw versions:set -DnewVersion="${TRAVIS_TAG}"; fi'
- 'nvm install ${TRAVIS_NODE_VERSION} && nvm use ${TRAVIS_NODE_VERSION}'
script: ./mvnw verify ${TRAVIS_TAG:+-Drevision=${TRAVIS_TAG}}
script: ./mvnw verify ${TRAVIS_TAG:+-Drevision=${TRAVIS_TAG} -DexcludeSpringCloud=true -DdisableSpringSnapshots=true}
after_success:
- ./mvnw jacoco:report coveralls:report
- ./mvnw jacoco:report coveralls:repor
- "[[ ${TRAVIS_PULL_REQUEST} == 'false' ]] && [[ ${TRAVIS_TAG} == '' ]] && ./mvnw deploy -DreposityId=sonatype-nexus-snapshots -DskipTests --settings deploy-settings.xml"
- "[[ ${TRAVIS_PULL_REQUEST} == 'false' ]] && [[ ${TRAVIS_TAG} != '' ]] && ./mvnw deploy -DreposityId=sonatype-nexus-staging -DskipTests -Drevision=${TRAVIS_TAG} --settings deploy-settings.xml"
- "[[ ${TRAVIS_PULL_REQUEST} == 'false' ]] && [[ ${TRAVIS_TAG} != '' ]] && ./mvnw deploy -DreposityId=sonatype-nexus-staging -DskipTests -Drevision=${TRAVIS_TAG} -DexcludeSpringCloud=true -DdisableSpringSnapshots=true --settings deploy-settings.xml"
......@@ -319,6 +319,17 @@
</build>
<profiles>
<profile>
<id>include-cloud</id>
<activation>
<property>
<name>!excludeSpringCloud</name>
</property>
</activation>
<modules>
<module>spring-boot-admin-server-cloud</module>
</modules>
</profile>
<profile>
<id>sign-artifacts</id>
<activation>
<property>
......
......@@ -34,13 +34,19 @@
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
<version>${revision}</version>
</dependency> <dependency>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-cloud</artifactId>
<version>${revision}</version>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-client</artifactId>
<version>${revision}</version>
</dependency>
......
......@@ -32,9 +32,6 @@
<module>spring-boot-admin-sample-servlet</module>
<module>spring-boot-admin-sample-reactive</module>
<module>spring-boot-admin-sample-war</module>
<module>spring-boot-admin-sample-eureka</module>
<module>spring-boot-admin-sample-consul</module>
<module>spring-boot-admin-sample-zookeeper</module>
<module>spring-boot-admin-sample-hazelcast</module>
</modules>
<build>
......@@ -58,59 +55,20 @@
</excludes>
</resource>
</resources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${maven-jar-plugin.version}</version>
<configuration>
<archive>
<manifest>
<mainClass>${start-class}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifest>
<mainClass>${start-class}</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${exec-maven-plugin.version}</version>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<executions>
<execution>
<goals>
<goal>repackage</goal>
</goals>
</execution>
</executions>
<configuration>
<mainClass>${start-class}</mainClass>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>include-cloud</id>
<activation>
<property>
<name>!excludeSpringCloud</name>
</property>
</activation>
<modules>
<module>spring-boot-admin-sample-eureka</module>
<module>spring-boot-admin-sample-consul</module>
<module>spring-boot-admin-sample-zookeeper</module>
</modules>
</profile>
</profiles>
</project>
......@@ -59,6 +59,19 @@
<finalName>${project.artifactId}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>${maven-war-plugin.version}</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<executions>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright 2014-2017 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.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>spring-boot-admin-server-cloud</artifactId>
<name>Spring Boot Admin Server Cloud</name>
<description>Spring Boot Admin Server Cloud</description>
<parent>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-build</artifactId>
<version>${revision}</version>
<relativePath>../spring-boot-admin-build</relativePath>
</parent>
<dependencies>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server</artifactId>
</dependency>
<!-- Optional Discovery Client -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
<optional>true</optional>
</dependency>
<!-- Optional Eureka Discovery Client -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Optional Configuration Processor for metadata -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!-- Test -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-json-org</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>
......@@ -14,12 +14,14 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.config;
package de.codecentric.boot.admin.server.cloud.config;
import de.codecentric.boot.admin.server.discovery.DefaultServiceInstanceConverter;
import de.codecentric.boot.admin.server.discovery.EurekaServiceInstanceConverter;
import de.codecentric.boot.admin.server.discovery.InstanceDiscoveryListener;
import de.codecentric.boot.admin.server.discovery.ServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.DefaultServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.EurekaServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.InstanceDiscoveryListener;
import de.codecentric.boot.admin.server.cloud.discovery.ServiceInstanceConverter;
import de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration;
import de.codecentric.boot.admin.server.config.AdminServerMarkerConfiguration;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
import de.codecentric.boot.admin.server.services.InstanceRegistry;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.entities.Instance;
import de.codecentric.boot.admin.server.domain.values.Registration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.entities.Instance;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.entities.Instance;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.entities.Instance;
......
{
"groups": [
],
"properties": [
{
"name": "spring.boot.admin.discovery.enabled",
"type": "java.lang.Boolean",
"description": "Enable Spring Cloud Discovery support.",
"defaultValue": "true"
}
]
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
de.codecentric.boot.admin.server.cloud.config.AdminServerDiscoveryAutoConfiguration
......@@ -14,15 +14,20 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server;
package de.codecentric.boot.admin.server.cloud;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
import reactor.core.publisher.Flux;
import reactor.test.StepVerifier;
import java.net.URI;
import java.time.Duration;
import java.util.List;
import java.util.concurrent.atomic.AtomicReference;
import org.json.JSONObject;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.SpringBootConfiguration;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
......@@ -32,17 +37,26 @@ import org.springframework.cloud.client.discovery.simple.SimpleDiscoveryProperti
import org.springframework.context.ConfigurableApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.http.MediaType;
import org.springframework.http.codec.json.Jackson2JsonDecoder;
import org.springframework.http.codec.json.Jackson2JsonEncoder;
import org.springframework.security.config.annotation.web.reactive.EnableWebFluxSecurity;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.web.reactive.function.client.ExchangeStrategies;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.datatype.jsonorg.JsonOrgModule;
import static java.util.Collections.singletonList;
import static org.assertj.core.api.Assertions.assertThat;
public class AdminApplicationDiscoveryTest extends AbstractAdminApplicationTest {
public class AdminApplicationDiscoveryTest {
private ConfigurableApplicationContext instance;
private SimpleDiscoveryProperties simpleDiscovery;
private WebTestClient webClient;
private int port;
@Before
public void setUp() {
......@@ -54,44 +68,121 @@ public class AdminApplicationDiscoveryTest extends AbstractAdminApplicationTest
simpleDiscovery = instance.getBean(SimpleDiscoveryProperties.class);
super.setUp(instance.getEnvironment().getProperty("local.server.port", Integer.class, 0));
this.port = instance.getEnvironment().getProperty("local.server.port", Integer.class, 0);
this.webClient = createWebClient(this.port);
}
@Test
public void lifecycle() {
AtomicReference<URI> location = new AtomicReference<>();
StepVerifier.create(getEventStream().log())
.expectSubscription()
.then(() -> {
listEmptyInstances();
location.set(registerInstance());
})
.assertNext((event) -> assertThat(event.opt("type")).isEqualTo("REGISTERED"))
.assertNext((event) -> assertThat(event.opt("type")).isEqualTo("STATUS_CHANGED"))
.assertNext((event) -> assertThat(event.opt("type")).isEqualTo("ENDPOINTS_DETECTED"))
.assertNext((event) -> assertThat(event.opt("type")).isEqualTo("INFO_CHANGED"))
.then(() -> {
getInstance(location.get());
listInstances();
deregisterInstance();
})
.assertNext((event) -> assertThat(event.opt("type")).isEqualTo("DEREGISTERED"))
.then(this::listEmptyInstances)
.thenCancel()
.verify(Duration.ofSeconds(60));
}
@Override
protected URI registerInstance() {
private URI registerInstance() {
//We register the instance by setting static values for the SimpleDiscoveryClient and issuing a
//InstanceRegisteredEvent that makes sure the instance gets registered.
SimpleDiscoveryProperties.SimpleServiceInstance serviceInstance = new SimpleDiscoveryProperties.SimpleServiceInstance();
serviceInstance.setServiceId("Test-Instance");
serviceInstance.setUri(URI.create("http://localhost:" + getPort()));
serviceInstance.setUri(URI.create("http://localhost:" + port));
serviceInstance.getMetadata().put("management.context-path", "/mgmt");
simpleDiscovery.getInstances().put("Test-Application", singletonList(serviceInstance));
instance.publishEvent(new InstanceRegisteredEvent<>(new Object(), null));
//To get the location of the registered instances we fetch the instance with the name.
List<JSONObject> applications = getWebClient().get()
.uri("/instances?name=Test-Instance")
.accept(MediaType.APPLICATION_JSON)
.exchange()
.expectStatus()
.isOk()
.returnResult(JSONObject.class)
.getResponseBody()
.collectList()
.block();
List<JSONObject> applications = webClient.get()
.uri("/instances?name=Test-Instance")
.accept(MediaType.APPLICATION_JSON)
.exchange()
.expectStatus()
.isOk()
.returnResult(JSONObject.class)
.getResponseBody()
.collectList()
.block();
assertThat(applications).hasSize(1);
return URI.create("http://localhost:" + getPort() + "/instances/" + applications.get(0).optString("id"));
return URI.create("http://localhost:" + port + "/instances/" + applications.get(0).optString("id"));
}
@Override
protected void deregisterInstance(URI uri) {
private void deregisterInstance() {
simpleDiscovery.getInstances().clear();
instance.publishEvent(new InstanceRegisteredEvent<>(new Object(), null));
}
private Flux<JSONObject> getEventStream() {
//@formatter:off
return webClient.get().uri("/instances/events").accept(MediaType.TEXT_EVENT_STREAM)
.exchange()
.expectStatus().isOk()
.expectHeader().contentTypeCompatibleWith(MediaType.TEXT_EVENT_STREAM)
.returnResult(JSONObject.class).getResponseBody();
//@formatter:on
}
private void getInstance(URI uri) {
//@formatter:off
webClient.get().uri(uri).accept(MediaType.APPLICATION_JSON_UTF8)
.exchange()
.expectStatus().isOk()
.expectBody()
.jsonPath("$.registration.name").isEqualTo("Test-Instance")
.jsonPath("$.statusInfo.status").isEqualTo("UP")
.jsonPath("$.info.test").isEqualTo("foobar");
//@formatter:on
}
private void listInstances() {
//@formatter:off
webClient.get().uri("/instances").accept(MediaType.APPLICATION_JSON_UTF8)
.exchange()
.expectStatus().isOk()
.expectBody()
.jsonPath("$[0].registration.name").isEqualTo("Test-Instance")
.jsonPath("$[0].statusInfo.status").isEqualTo("UP")
.jsonPath("$[0].info.test").isEqualTo("foobar");
//@formatter:on
}
private void listEmptyInstances() {
//@formatter:off
webClient.get().uri("/instances").accept(MediaType.APPLICATION_JSON_UTF8)
.exchange()
.expectStatus().isOk()
.expectBody().json("[]");
//@formatter:on
}
private WebTestClient createWebClient(int port) {
ObjectMapper mapper = new ObjectMapper().registerModule(new JsonOrgModule());
return WebTestClient.bindToServer()
.baseUrl("http://localhost:" + port)
.exchangeStrategies(ExchangeStrategies.builder().codecs((configurer) -> {
configurer.defaultCodecs().jackson2JsonDecoder(new Jackson2JsonDecoder(mapper));
configurer.defaultCodecs().jackson2JsonEncoder(new Jackson2JsonEncoder(mapper));
}).build())
.build();
}
@After
public void shutdown() {
instance.close();
......
/*
* Copyright 2014-2017 the original author or authors.
* Copyright 2014-2018 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.
......@@ -14,11 +14,13 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.config;
package de.codecentric.boot.admin.server.cloud.config;
import de.codecentric.boot.admin.server.discovery.DefaultServiceInstanceConverter;
import de.codecentric.boot.admin.server.discovery.EurekaServiceInstanceConverter;
import de.codecentric.boot.admin.server.discovery.ServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.DefaultServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.EurekaServiceInstanceConverter;
import de.codecentric.boot.admin.server.cloud.discovery.ServiceInstanceConverter;
import de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration;
import de.codecentric.boot.admin.server.config.AdminServerMarkerConfiguration;
import de.codecentric.boot.admin.server.domain.values.Registration;
import org.junit.After;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.values.Registration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.values.Registration;
......
......@@ -14,7 +14,7 @@
* limitations under the License.
*/
package de.codecentric.boot.admin.server.discovery;
package de.codecentric.boot.admin.server.cloud.discovery;
import de.codecentric.boot.admin.server.domain.entities.EventsourcingInstanceRepository;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
......
......@@ -64,24 +64,6 @@
<artifactId>spring-boot-starter-mail</artifactId>
<optional>true</optional>
</dependency>
<!-- Optional Discovery Client -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter</artifactId>
<optional>true</optional>
</dependency>
<!-- Optional Eureka Discovery Client -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
<optional>true</optional>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Optional Hazelcast-Support -->
<dependency>
<groupId>com.hazelcast</groupId>
......@@ -127,19 +109,4 @@
<scope>test</scope>
</dependency>
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
</resource>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
<includes>
<include>instance.properties</include>
</includes>
</resource>
</resources>
</build>
</project>
......@@ -13,12 +13,6 @@
"type": "java.lang.String",
"description": "Name of backing Hazelcast-Map for storing the instance events",
"defaultValue": "spring-boot-admin-application-store"
},
{
"name": "spring.boot.admin.discovery.enabled",
"type": "java.lang.Boolean",
"description": "Enable Spring Cloud Discovery support.",
"defaultValue": "true"
}
]
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
de.codecentric.boot.admin.server.config.AdminServerAutoConfiguration,\
de.codecentric.boot.admin.server.config.AdminServerNotifierAutoConfiguration,\
de.codecentric.boot.admin.server.config.AdminServerDiscoveryAutoConfiguration,\
de.codecentric.boot.admin.server.config.AdminServerHazelcastAutoConfiguration,\
de.codecentric.boot.admin.server.config.AdminServerCloudFoundryAutoConfiguration
......@@ -16,7 +16,6 @@
package de.codecentric.boot.admin.server.config;
import de.codecentric.boot.admin.server.discovery.InstanceDiscoveryListener;
import de.codecentric.boot.admin.server.domain.entities.InstanceRepository;
import de.codecentric.boot.admin.server.domain.entities.SnapshottingInstanceRepository;
import de.codecentric.boot.admin.server.eventstore.ConcurrentMapEventStore;
......@@ -29,8 +28,6 @@ import org.junit.Test;
import org.springframework.boot.autoconfigure.hazelcast.HazelcastAutoConfiguration;
import org.springframework.boot.autoconfigure.web.client.RestTemplateAutoConfiguration;
import org.springframework.boot.test.util.TestPropertyValues;
import org.springframework.cloud.client.discovery.simple.SimpleDiscoveryClientAutoConfiguration;
import org.springframework.cloud.commons.util.UtilAutoConfiguration;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
......@@ -64,12 +61,6 @@ public class AdminServerWebConfigurationTest {
assertThat(context.getBean(InstanceEventStore.class)).isInstanceOf(HazelcastEventStore.class);
}
@Test
public void discoveryConfig() {
load(SimpleDiscoveryClientAutoConfiguration.class);
assertThat(context.getBean(InstanceRepository.class)).isInstanceOf(SnapshottingInstanceRepository.class);
context.getBean(InstanceDiscoveryListener.class);
}
@Configuration
static class TestHazelcastConfig {
......@@ -90,11 +81,9 @@ public class AdminServerWebConfigurationTest {
}
applicationContext.register(RestTemplateAutoConfiguration.class);
applicationContext.register(HazelcastAutoConfiguration.class);
applicationContext.register(UtilAutoConfiguration.class);
applicationContext.register(AdminServerMarkerConfiguration.class);
applicationContext.register(AdminServerHazelcastAutoConfiguration.class);
applicationContext.register(AdminServerAutoConfiguration.class);
applicationContext.register(AdminServerDiscoveryAutoConfiguration.class);
TestPropertyValues.of(environment).applyTo(applicationContext);
applicationContext.refresh();
......
......@@ -34,6 +34,10 @@
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-cloud</artifactId>
</dependency>
<dependency>
<groupId>de.codecentric</groupId>
<artifactId>spring-boot-admin-server-ui</artifactId>
</dependency>
</dependencies>
......
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