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

View File

@ -96,7 +96,7 @@ public class FilteredWebClientUnitTest {
stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200) stubFor(get(urlPathEqualTo(PATH)).willReturn(aResponse().withStatus(200)
.withBody("done"))); .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() WebClient webClient = WebClient.builder()
.filter(loggingFilter(ps)) .filter(loggingFilter(ps))
.build(); .build();