Skip to content

Commit ce229a7

Browse files
authored
Changes for the latest Boot snapshots (#4506)
* Changes for the latest Boot snapshots * Add Spring Boot Jackson 2 module
1 parent eba4fa8 commit ce229a7

19 files changed

+41
-29
lines changed

spring-cloud-netflix-dependencies/pom.xml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
<description>Spring Cloud Netflix Dependencies</description>
1616
<properties>
1717
<eureka.version>2.0.5</eureka.version>
18-
<jackson.version>2.20.0</jackson.version>
1918
</properties>
2019
<dependencyManagement>
2120
<dependencies>
@@ -145,11 +144,6 @@
145144
</exclusion>
146145
</exclusions>
147146
</dependency>
148-
<dependency>
149-
<groupId> com.fasterxml.jackson.core</groupId>
150-
<artifactId>jackson-databind</artifactId>
151-
<version>${jackson.version}</version>
152-
</dependency>
153147
</dependencies>
154148
</dependencyManagement>
155149
<profiles>

spring-cloud-netflix-eureka-client/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
<maven.javadoc.failOnError>false</maven.javadoc.failOnError>
1919
</properties>
2020
<dependencies>
21+
<dependency>
22+
<groupId>org.springframework.boot</groupId>
23+
<artifactId>spring-boot-jackson2</artifactId>
24+
</dependency>
2125
<dependency>
2226
<groupId>org.springframework.boot</groupId>
2327
<artifactId>spring-boot-configuration-processor</artifactId>

spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaDiscoveryClientConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@
2121
import com.netflix.discovery.EurekaClientConfig;
2222

2323
import org.springframework.beans.factory.annotation.Autowired;
24-
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
25-
import org.springframework.boot.actuate.health.StatusAggregator;
2624
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
2725
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
2826
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
2927
import org.springframework.boot.context.properties.EnableConfigurationProperties;
28+
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
29+
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
3030
import org.springframework.cloud.client.ConditionalOnBlockingDiscoveryEnabled;
3131
import org.springframework.cloud.client.ConditionalOnDiscoveryEnabled;
3232
import org.springframework.cloud.context.scope.refresh.RefreshScopeRefreshedEvent;

spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/EurekaHealthCheckHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
import org.springframework.beans.BeansException;
2929
import org.springframework.beans.factory.InitializingBean;
30-
import org.springframework.boot.actuate.health.StatusAggregator;
30+
import org.springframework.boot.health.actuate.endpoint.StatusAggregator;
3131
import org.springframework.boot.health.contributor.CompositeHealthContributor;
3232
import org.springframework.boot.health.contributor.CompositeReactiveHealthContributor;
3333
import org.springframework.boot.health.contributor.Health;

spring-cloud-netflix-eureka-client/src/main/java/org/springframework/cloud/netflix/eureka/http/EurekaApplications.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
import com.netflix.discovery.shared.Applications;
2525

2626
/**
27-
* A simple wrapper class for {@link Applications} that insure proprer Jackson
28-
* serialization through the JsonPropert overwrites.
27+
* A simple wrapper class for {@link Applications} that insure proper Jackson
28+
* serialization through the JsonProperties overwrites.
2929
*
3030
* @author Daniel Lavoie
3131
*/

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/EurekaHealthCheckHandlerTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.junit.jupiter.api.Test;
2727
import reactor.core.publisher.Mono;
2828

29-
import org.springframework.boot.actuate.health.SimpleStatusAggregator;
29+
import org.springframework.boot.health.actuate.endpoint.SimpleStatusAggregator;
3030
import org.springframework.boot.health.contributor.AbstractHealthIndicator;
3131
import org.springframework.boot.health.contributor.AbstractReactiveHealthIndicator;
3232
import org.springframework.boot.health.contributor.CompositeHealthContributor;

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaConfigServerBootstrapConfigurationRestClientIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.boot.SpringBootConfiguration;
2323
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2424
import org.springframework.boot.test.context.SpringBootTest;
25-
import org.springframework.boot.web.server.test.LocalServerPort;
25+
import org.springframework.boot.test.web.server.LocalServerPort;
2626
import org.springframework.cloud.netflix.eureka.http.RestClientEurekaHttpClient;
2727
import org.springframework.context.annotation.Bean;
2828
import org.springframework.http.HttpStatus;

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/config/EurekaConfigServerBootstrapConfigurationWebClientIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
import org.springframework.boot.SpringBootConfiguration;
2323
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
2424
import org.springframework.boot.test.context.SpringBootTest;
25-
import org.springframework.boot.web.server.test.LocalServerPort;
25+
import org.springframework.boot.test.web.server.LocalServerPort;
2626
import org.springframework.cloud.netflix.eureka.http.WebClientEurekaHttpClient;
2727
import org.springframework.context.annotation.Bean;
2828
import org.springframework.http.HttpStatus;

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/http/RestClientEurekaHttpClientTests.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,14 @@
4646
*/
4747
@SpringBootTest(classes = EurekaServerMockApplication.class,
4848
properties = { "debug=true", "security.basic.enabled=true", "eureka.client.fetch-registry=false",
49-
"eureka.client.register-with-eureka=false", "logging.level.org.springframework=INFO" },
49+
"eureka.client.register-with-eureka=false", "logging.level.org.springframework=INFO",
50+
// spring.http.converters.preferred-json-mapper=jackson2 is only necessary
51+
// to make the
52+
// mock Eureka Server used in this test to work
53+
// TODO we can likely remove this once this Boot issue is fixed post
54+
// 2025.1.0-RC1:
55+
// https://github.com/spring-projects/spring-boot/issues/47798
56+
"spring.http.converters.preferred-json-mapper=jackson2" },
5057
webEnvironment = WebEnvironment.RANDOM_PORT)
5158
@DirtiesContext
5259
class RestClientEurekaHttpClientTests extends AbstractEurekaHttpClientTests {

spring-cloud-netflix-eureka-client/src/test/java/org/springframework/cloud/netflix/eureka/http/WebClientEurekaHttpClientTests.java

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,14 @@
3434
*/
3535
@SpringBootTest(classes = EurekaServerMockApplication.class,
3636
properties = { "debug=true", "security.basic.enabled=true", "eureka.client.webclient.enabled=true",
37-
"eureka.client.fetch-registry=false", "eureka.client.register-with-eureka=false" },
37+
"eureka.client.fetch-registry=false", "eureka.client.register-with-eureka=false",
38+
// spring.http.converters.preferred-json-mapper=jackson2 is only necessary
39+
// to make the
40+
// mock Eureka Server used in this test to work
41+
// TODO we can likely remove this once this Boot issue is fixed post
42+
// 2025.1.0-RC1:
43+
// https://github.com/spring-projects/spring-boot/issues/47798
44+
"spring.http.converters.preferred-json-mapper=jackson2" },
3845
webEnvironment = WebEnvironment.RANDOM_PORT)
3946
@DirtiesContext
4047
class WebClientEurekaHttpClientTests extends AbstractEurekaHttpClientTests {

0 commit comments

Comments
 (0)