JAVA-29008 :- Upgrade spring-reactive-filters to Spring Boot 3. (#16069)

This commit is contained in:
Amit Pandey 2024-03-11 02:13:51 +05:30 committed by GitHub
parent 3a93ed50b3
commit d15b477cab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 11 deletions

View File

@ -10,9 +10,10 @@
<description>spring boot sample project about new features</description>
<parent>
<groupId>com.baeldung.spring.reactive</groupId>
<artifactId>spring-reactive-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
<groupId>com.baeldung</groupId>
<artifactId>parent-boot-3</artifactId>
<version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-3</relativePath>
</parent>
<dependencies>
@ -20,6 +21,16 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-core</artifactId>
<version>${reactor.version}</version>
</dependency>
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
</dependency>
<!-- runtime and test scoped -->
<dependency>
<groupId>org.springframework.boot</groupId>
@ -41,16 +52,16 @@
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Fix ERROR i.n.r.d.DnsServerAddressStreamProviders - Unable to load io.netty.resolver.dns.macos.MacOSDnsServerAddressStreamProvider -->
<dependency>
<groupId>io.netty</groupId>
<artifactId>netty-all</artifactId>
<groupId>org.wiremock</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>${wiremock-standalone.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-standalone</artifactId>
<version>${wiremock-standalone.version}</version>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>${reactor.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
@ -69,7 +80,8 @@
</build>
<properties>
<wiremock-standalone.version>2.26.0</wiremock-standalone.version>
<wiremock-standalone.version>3.4.2</wiremock-standalone.version>
<reactor.version>3.6.0</reactor.version>
</properties>
</project>

View File

@ -96,7 +96,7 @@ public class FilteredWebClientUnitTest {
stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
.withBody("done")));
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos);) {
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(baos)) {
WebClient webClient = WebClient.builder()
.filter(loggingFilter(ps))
.build();