Merge pull request #7903 from fanatixan/bael-16659

BAEL-16659
This commit is contained in:
Josh Cummings 2019-10-05 09:32:51 -06:00 committed by GitHub
commit 9a2f9bec54
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
48 changed files with 50 additions and 35 deletions

View File

@ -3,5 +3,10 @@
This module contains articles about reactive Spring 5
- [Spring WebClient vs. RestTemplate](https://www.baeldung.com/spring-webclient-resttemplate)
- [Validation for Functional Endpoints in Spring 5](https://www.baeldung.com/spring-functional-endpoints-validation)
- [Logging a Reactive Sequence](https://www.baeldung.com/spring-reactive-sequence-logging)
- [Testing Reactive Streams Using StepVerifier and TestPublisher](https://www.baeldung.com/reactive-streams-step-verifier-test-publisher)
- [Debugging Reactive Streams in Spring 5](https://www.baeldung.com/spring-debugging-reactive-streams)
- [Static Content in Spring WebFlux](https://www.baeldung.com/spring-webflux-static-content)
- [Spring WebClient Filters](https://www.baeldung.com/spring-webclient-filters)
- More articles: [[<-- prev]](/spring-5-reactive)

View File

@ -23,22 +23,37 @@
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-spring</artifactId>
<version>${reactor-spring.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>${lombok.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.github.tomakehurst</groupId>
<artifactId>wiremock-jre8</artifactId>
<version>${wiremock.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
@ -55,6 +70,7 @@
</build>
<properties>
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
<wiremock.version>2.24.0</wiremock.version>
</properties>

View File

@ -28,6 +28,7 @@ public class ConsumerDebuggingApplication {
http.authorizeExchange()
.anyExchange()
.permitAll();
http.csrf().disable();
return http.build();
}
}

View File

@ -2,10 +2,7 @@ package com.baeldung.debugging.consumer.model;
import java.util.concurrent.ThreadLocalRandom;
import org.springframework.data.annotation.Id;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
@ -16,7 +13,6 @@ import lombok.Setter;
@AllArgsConstructor
public class Foo {
@Id
private Integer id;
private String formattedName;
private Integer quantity;

View File

@ -1,7 +1,5 @@
package com.baeldung.debugging.server.model;
import org.springframework.data.annotation.Id;
import lombok.AllArgsConstructor;
import lombok.Data;
@ -9,7 +7,6 @@ import lombok.Data;
@AllArgsConstructor
public class Foo {
@Id
private Long id;
private String name;

View File

@ -1,7 +1,6 @@
package com.baeldung.validations.functional.handlers.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.http.MediaType;
import org.springframework.stereotype.Component;
import org.springframework.validation.Validator;

View File

@ -2,10 +2,22 @@ package com.baeldung.webclient;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@SpringBootApplication
public class WebClientApplication {
public static void main(String[] args) {
SpringApplication.run(WebClientApplication.class, args);
}
@Bean
public SecurityWebFilterChain functionalValidationsSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange()
.anyExchange()
.permitAll();
http.csrf().disable();
return http.build();
}
}

View File

@ -11,7 +11,7 @@ import com.baeldung.validations.functional.model.CustomRequestEntity;
import reactor.core.publisher.Mono;
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)
public class FunctionalEndpointValidationsLiveTest {
private static final String BASE_URL = "http://localhost:8080";

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Baeldung: Static Content in Spring WebFlux</title>
</head>
<body>
Example HTML file
</body>
</html>

View File

@ -3,7 +3,7 @@
This module contains articles about reactive Spring 5
### The Course
The "REST With Spring" Classes: http://bit.ly/restwithspring
The "REST With Spring" Classes: https://bit.ly/restwithspring
### Relevant Articles
@ -11,15 +11,10 @@ The "REST With Spring" Classes: http://bit.ly/restwithspring
- [Spring 5 WebClient](https://www.baeldung.com/spring-5-webclient)
- [Exploring the Spring 5 WebFlux URL Matching](https://www.baeldung.com/spring-5-mvc-url-matching)
- [Reactive WebSockets with Spring 5](https://www.baeldung.com/spring-5-reactive-websockets)
- [Spring Webflux Filters](httpss://www.baeldung.com/spring-webflux-filters)
- [Spring Webflux Filters](https://www.baeldung.com/spring-webflux-filters)
- [How to Set a Header on a Response with Spring 5](https://www.baeldung.com/spring-response-header)
- [Spring Webflux and CORS](https://www.baeldung.com/spring-webflux-cors)
- [Handling Errors in Spring WebFlux](https://www.baeldung.com/spring-webflux-errors)
- [Server-Sent Events in Spring](https://www.baeldung.com/spring-server-sent-events)
- [A Guide to Spring Session Reactive Support: WebSession](https://www.baeldung.com/spring-session-reactive)
- [Validation for Functional Endpoints in Spring 5](https://www.baeldung.com/spring-functional-endpoints-validation)
- [Logging a Reactive Sequence](https://www.baeldung.com/spring-reactive-sequence-logging)
- [Testing Reactive Streams Using StepVerifier and TestPublisher](https://www.baeldung.com/reactive-streams-step-verifier-test-publisher)
- [Debugging Reactive Streams in Spring 5](https://www.baeldung.com/spring-debugging-reactive-streams)
- [Static Content in Spring WebFlux](https://www.baeldung.com/spring-webflux-static-content)
- More articles: [[next -->]](/spring-5-reactive-2)

View File

@ -29,11 +29,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
</dependency>
<dependency>
<groupId>org.projectreactor</groupId>
<artifactId>reactor-spring</artifactId>
<version>${reactor-spring.version}</version>
</dependency>
<dependency>
<groupId>javax.json.bind</groupId>
<artifactId>javax.json.bind-api</artifactId>
@ -112,18 +107,10 @@
<dependency>
<groupId>io.reactivex.rxjava2</groupId>
<artifactId>rxjava</artifactId>
<version>${rxjava-version}</version>
</dependency>
<dependency>
<groupId>io.projectreactor</groupId>
<artifactId>reactor-test</artifactId>
<version>${project-reactor-test}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>${httpclient.version}</version>
</dependency>
</dependencies>
@ -165,13 +152,10 @@
<properties>
<reactor-spring.version>1.0.1.RELEASE</reactor-spring.version>
<rxjava-version>2.1.12</rxjava-version>
<johnzon.version>1.1.3</johnzon.version>
<jsonb-api.version>1.0</jsonb-api.version>
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
<commons-collections4.version>4.1</commons-collections4.version>
<project-reactor-test>3.2.3.RELEASE</project-reactor-test>
<httpclient.version>4.5.8</httpclient.version>
</properties>
</project>