JAVA-3060: fixing failing integration tests in spring-reactive.
This commit is contained in:
parent
e1b05f08c0
commit
fddd9b4381
|
@ -1,16 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<configuration>
|
<configuration scan="true" scanPeriod="15 seconds" debug="false">
|
||||||
<include
|
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
resource="org/springframework/boot/logging/logback/base.xml" />
|
<encoder>
|
||||||
<appender name="LISTAPPENDER"
|
<pattern>[%d{ISO8601}]-[%thread] %-5level %logger - %msg%n</pattern>
|
||||||
class="com.baeldung.debugging.consumer.utils.ListAppender">
|
</encoder>
|
||||||
</appender>
|
</appender>
|
||||||
<logger
|
|
||||||
name="com.baeldung.debugging.consumer.service.FooService">
|
<root level="INFO">
|
||||||
<appender-ref ref="LISTAPPENDER" />
|
<appender-ref ref="STDOUT" />
|
||||||
</logger>
|
|
||||||
<root level="info">
|
|
||||||
<appender-ref ref="CONSOLE" />
|
|
||||||
<appender-ref ref="LISTAPPENDER" />
|
|
||||||
</root>
|
</root>
|
||||||
</configuration>
|
</configuration>
|
|
@ -2,6 +2,7 @@ package com.baeldung.reactive.debugging.server;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
||||||
import org.springframework.security.web.server.SecurityWebFilterChain;
|
import org.springframework.security.web.server.SecurityWebFilterChain;
|
||||||
|
@ -10,7 +11,7 @@ import org.springframework.web.reactive.config.EnableWebFlux;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
|
||||||
@EnableWebFlux
|
@EnableWebFlux
|
||||||
@SpringBootApplication
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class ServerDebuggingApplication {
|
public class ServerDebuggingApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -2,11 +2,12 @@ package com.baeldung.reactive.errorhandling;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
||||||
import org.springframework.security.web.server.SecurityWebFilterChain;
|
import org.springframework.security.web.server.SecurityWebFilterChain;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class ErrorHandlingApplication {
|
public class ErrorHandlingApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -2,13 +2,24 @@ package com.baeldung.reactive.webclient;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
import org.springframework.boot.autoconfigure.security.reactive.ReactiveSecurityAutoConfiguration;
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.security.config.web.server.ServerHttpSecurity;
|
||||||
|
import org.springframework.security.web.server.SecurityWebFilterChain;
|
||||||
|
|
||||||
@SpringBootApplication(exclude = { ReactiveSecurityAutoConfiguration.class })
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class WebClientApplication {
|
public class WebClientApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
SpringApplication.run(WebClientApplication.class, args);
|
SpringApplication.run(WebClientApplication.class, args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public SecurityWebFilterChain functionalValidationsSpringSecurityFilterChain(ServerHttpSecurity http) {
|
||||||
|
http.authorizeExchange()
|
||||||
|
.anyExchange()
|
||||||
|
.permitAll();
|
||||||
|
http.csrf().disable();
|
||||||
|
return http.build();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,9 @@ package com.baeldung.reactive.webclientrequests;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class SpringWebClientRequestsApp {
|
public class SpringWebClientRequestsApp {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
package com.baeldung.reactive.webflux;
|
package com.baeldung.reactive.webflux;
|
||||||
|
|
||||||
import com.baeldung.reactive.webflux.Employee;
|
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
import reactor.core.publisher.Flux;
|
import reactor.core.publisher.Flux;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
|
|
|
@ -2,8 +2,9 @@ package com.baeldung.reactive.webflux.annotation;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class EmployeeSpringApplication {
|
public class EmployeeSpringApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -2,8 +2,9 @@ package com.baeldung.reactive.webflux.functional;
|
||||||
|
|
||||||
import org.springframework.boot.SpringApplication;
|
import org.springframework.boot.SpringApplication;
|
||||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration;
|
||||||
|
|
||||||
@SpringBootApplication
|
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
|
||||||
public class EmployeeSpringFunctionalApplication {
|
public class EmployeeSpringFunctionalApplication {
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
|
|
|
@ -6,9 +6,11 @@ import org.junit.runner.RunWith;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.boot.test.context.SpringBootTest;
|
import org.springframework.boot.test.context.SpringBootTest;
|
||||||
import org.springframework.boot.web.server.LocalServerPort;
|
import org.springframework.boot.web.server.LocalServerPort;
|
||||||
|
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;
|
||||||
|
|
||||||
|
@DirtiesContext(classMode = DirtiesContext.ClassMode.BEFORE_CLASS)
|
||||||
@RunWith(SpringRunner.class)
|
@RunWith(SpringRunner.class)
|
||||||
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = WebClientApplication.class)
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = WebClientApplication.class)
|
||||||
public class WebControllerIntegrationTest {
|
public class WebControllerIntegrationTest {
|
||||||
|
|
Loading…
Reference in New Issue