commit
728e5f39a9
2
pom.xml
2
pom.xml
@ -577,12 +577,12 @@
|
|||||||
<module>spring-4</module>
|
<module>spring-4</module>
|
||||||
|
|
||||||
<module>spring-5</module>
|
<module>spring-5</module>
|
||||||
|
<module>spring-5-webflux</module>
|
||||||
<module>spring-5-mvc</module>
|
<module>spring-5-mvc</module>
|
||||||
<module>spring-5-reactive</module>
|
<module>spring-5-reactive</module>
|
||||||
<module>spring-5-reactive-client</module>
|
<module>spring-5-reactive-client</module>
|
||||||
<module>spring-5-reactive-oauth</module>
|
<module>spring-5-reactive-oauth</module>
|
||||||
<module>spring-5-reactive-security</module>
|
<module>spring-5-reactive-security</module>
|
||||||
<module>spring-5-reactive-netty</module>
|
|
||||||
<module>spring-5-security</module>
|
<module>spring-5-security</module>
|
||||||
<module>spring-5-security-oauth</module>
|
<module>spring-5-security-oauth</module>
|
||||||
|
|
||||||
|
11
spring-5-reactive-netty/.gitignore
vendored
11
spring-5-reactive-netty/.gitignore
vendored
@ -1,11 +0,0 @@
|
|||||||
# Folders #
|
|
||||||
**/.idea
|
|
||||||
**/target
|
|
||||||
|
|
||||||
# Files #
|
|
||||||
*.log
|
|
||||||
|
|
||||||
# Packaged files #
|
|
||||||
*.jar
|
|
||||||
*.war
|
|
||||||
*.ear
|
|
@ -1,3 +0,0 @@
|
|||||||
## Spring 5 Reactive Project With Netty Server
|
|
||||||
|
|
||||||
Includes configuration options for Netty server.
|
|
@ -1,51 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>spring-5-reactive-netty</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<name>spring-5-reactive-netty</name>
|
|
||||||
<packaging>jar</packaging>
|
|
||||||
<description>Spring 5 sample project about reactive web with Netty server</description>
|
|
||||||
|
|
||||||
<parent>
|
|
||||||
<groupId>com.baeldung</groupId>
|
|
||||||
<artifactId>parent-boot-2</artifactId>
|
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
|
||||||
<relativePath>../parent-boot-2</relativePath>
|
|
||||||
</parent>
|
|
||||||
|
|
||||||
<dependencies>
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-webflux</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.projectlombok</groupId>
|
|
||||||
<artifactId>lombok</artifactId>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-devtools</artifactId>
|
|
||||||
<scope>runtime</scope>
|
|
||||||
</dependency>
|
|
||||||
|
|
||||||
<dependency>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-starter-test</artifactId>
|
|
||||||
<scope>test</scope>
|
|
||||||
</dependency>
|
|
||||||
</dependencies>
|
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.springframework.boot</groupId>
|
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
</project>
|
|
2
spring-5-webflux/.gitignore
vendored
Normal file
2
spring-5-webflux/.gitignore
vendored
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
# Files #
|
||||||
|
*.log
|
@ -3,21 +3,18 @@
|
|||||||
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
<groupId>com.baeldung</groupId>
|
<groupId>com.baeldung</groupId>
|
||||||
<artifactId>spring-5-webflux</artifactId>
|
<artifactId>spring-5-webflux</artifactId>
|
||||||
<version>1.0-SNAPSHOT</version>
|
<version>1.0-SNAPSHOT</version>
|
||||||
|
|
||||||
<name>spring-5-webflux</name>
|
<name>spring-5-webflux</name>
|
||||||
|
|
||||||
<url>http://www.baeldung.com</url>
|
<url>http://www.baeldung.com</url>
|
||||||
|
|
||||||
<properties>
|
<parent>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<groupId>com.baeldung</groupId>
|
||||||
<maven.compiler.source>1.8</maven.compiler.source>
|
<artifactId>parent-boot-2</artifactId>
|
||||||
<maven.compiler.target>1.8</maven.compiler.target>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<spring-boot.version>2.0.2.RELEASE</spring-boot.version>
|
<relativePath>../parent-boot-2</relativePath>
|
||||||
</properties>
|
</parent>
|
||||||
|
|
||||||
<dependencyManagement>
|
<dependencyManagement>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
@ -58,12 +55,8 @@
|
|||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<version>3.8.0</version>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
</plugin>
|
|
||||||
<plugin>
|
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
|
||||||
<version>2.22.1</version>
|
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import io.netty.channel.EventLoopGroup;
|
import io.netty.channel.EventLoopGroup;
|
||||||
import io.netty.channel.nio.NioEventLoopGroup;
|
import io.netty.channel.nio.NioEventLoopGroup;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PathVariable;
|
import org.springframework.web.bind.annotation.PathVariable;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
|
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
|
||||||
import org.springframework.boot.web.embedded.netty.NettyServerCustomizer;
|
import org.springframework.boot.web.embedded.netty.NettyServerCustomizer;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
|
import org.springframework.boot.web.embedded.netty.NettyReactiveWebServerFactory;
|
||||||
import org.springframework.boot.web.embedded.netty.SslServerCustomizer;
|
import org.springframework.boot.web.embedded.netty.SslServerCustomizer;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
@ -9,7 +9,7 @@ import org.springframework.test.web.reactive.server.WebTestClient;
|
|||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
|
||||||
public class ResponseStatusControllerTests {
|
public class ResponseStatusControllerLiveTest {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private WebTestClient testClient;
|
private WebTestClient testClient;
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import static org.mockito.Mockito.when;
|
import static org.mockito.Mockito.when;
|
||||||
|
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import io.netty.handler.ssl.SslContext;
|
import io.netty.handler.ssl.SslContext;
|
||||||
import io.netty.handler.ssl.SslContextBuilder;
|
import io.netty.handler.ssl.SslContextBuilder;
|
||||||
@ -10,7 +10,7 @@ import org.junit.runner.RunWith;
|
|||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
|
||||||
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
|
import org.springframework.http.client.reactive.ReactorClientHttpConnector;
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.annotation.DirtiesContext;
|
||||||
import org.springframework.test.context.junit4.SpringRunner;
|
import org.springframework.test.context.junit4.SpringRunner;
|
||||||
import org.springframework.test.web.reactive.server.WebTestClient;
|
import org.springframework.test.web.reactive.server.WebTestClient;
|
||||||
import org.springframework.test.web.reactive.server.WebTestClient.ResponseSpec;
|
import org.springframework.test.web.reactive.server.WebTestClient.ResponseSpec;
|
||||||
@ -18,6 +18,7 @@ import reactor.netty.http.client.HttpClient;
|
|||||||
|
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
|
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
|
||||||
|
@DirtiesContext
|
||||||
public class GreetingLiveTest {
|
public class GreetingLiveTest {
|
||||||
|
|
||||||
private static final String BASE_URL = "https://localhost:8443";
|
private static final String BASE_URL = "https://localhost:8443";
|
@ -1,4 +1,4 @@
|
|||||||
package com.baeldung.serverconfig;
|
package com.baeldung.spring.serverconfig;
|
||||||
|
|
||||||
import org.springframework.test.context.ActiveProfiles;
|
import org.springframework.test.context.ActiveProfiles;
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user