Skip to content

Commit

Permalink
chore: spring boot 3.4 required upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
SteKoe committed Nov 25, 2024
1 parent cbbe4fd commit 2119d74
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@

<!-- used dependencies versions -->
<spring-boot.version>3.4.0</spring-boot.version>
<spring-cloud.version>2023.0.3</spring-cloud.version>
<spring-cloud.version>2024.0.0-RC1</spring-cloud.version>
<wiremock.version>3.0.1</wiremock.version>
<hazelcast-tests.version>5.4.0</hazelcast-tests.version>
<hazelcast-tests.version>5.5.0</hazelcast-tests.version>
<findbugs-jsr305.version>3.0.2</findbugs-jsr305.version>
<awaitility.version>4.2.2</awaitility.version>
<testcontainers.version>1.20.4</testcontainers.version>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package de.codecentric.boot.admin.client.config;

import java.time.Duration;

import org.junit.jupiter.api.Test;
import org.springframework.boot.actuate.autoconfigure.endpoint.EndpointAutoConfiguration;
import org.springframework.boot.actuate.autoconfigure.endpoint.web.WebEndpointAutoConfiguration;
Expand Down Expand Up @@ -106,8 +108,8 @@ public void blockingClientInBlockingEnvironment() {

Integer connectTimeout = (Integer) ReflectionTestUtils.getField(requestFactory, "connectTimeout");
assertThat(connectTimeout).isEqualTo(1337);
Integer readTimeout = (Integer) ReflectionTestUtils.getField(requestFactory, "readTimeout");
assertThat(readTimeout).isEqualTo(42);
Duration readTimeout = (Duration) ReflectionTestUtils.getField(requestFactory, "readTimeout");
assertThat(readTimeout).isEqualTo(Duration.ofMillis(42));
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand All @@ -34,6 +35,7 @@
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.MediaType;
import org.springframework.web.reactive.config.WebFluxConfigurer;
import org.springframework.web.servlet.config.annotation.PathMatchConfigurer;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
Expand Down Expand Up @@ -204,10 +206,13 @@ public HomepageForwardingFilterConfig homepageForwardingFilterConfig() throws IO
public void addResourceHandlers(org.springframework.web.reactive.config.ResourceHandlerRegistry registry) {
registry.addResourceHandler(this.adminServer.path("/**"))
.addResourceLocations(this.adminUi.getResourceLocations())
.setCacheControl(this.adminUi.getCache().toCacheControl());
.setCacheControl(this.adminUi.getCache().toCacheControl())
.setMediaTypes(Map.of("js", new MediaType("application", "javascript")));

registry.addResourceHandler(this.adminServer.path("/extensions/**"))
.addResourceLocations(this.adminUi.getExtensionResourceLocations())
.setCacheControl(this.adminUi.getCache().toCacheControl());
.setCacheControl(this.adminUi.getCache().toCacheControl())
.setMediaTypes(Map.of("js", new MediaType("application", "javascript")));
}

@Bean
Expand Down

0 comments on commit 2119d74

Please sign in to comment.