Merge pull request #5836 from rozagerardo/geroza/BAEL-10843_subtask-part-1_BAEL-10354_migrateparent-boot-to-spring-boot-2.1_part-1

BAEL-10843 | Upgrade set of modules to use boot 2.1 - part 1
This commit is contained in:
Loredana Crusoveanu 2018-12-07 22:21:33 +02:00 committed by GitHub
commit 0e5df58ec5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
85 changed files with 347 additions and 199 deletions

View File

@ -0,0 +1,2 @@
This pom will be ued only temporary until we migrate parent-boot-2 to 2.1.0 for ticket BAEL-10354

View File

@ -0,0 +1,85 @@
<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>
<artifactId>parent-boot-2.0-temp</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
<description>Temporary Parent for all Spring Boot 2.0.x modules</description>
<!-- This pom will be ued only temporary until we migrate parent-boot-2 to 2.1.0 for ticket BAEL-10354 -->
<parent>
<groupId>com.baeldung</groupId>
<artifactId>parent-modules</artifactId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring-boot.version}</version>
<configuration>
<mainClass>${start-class}</mainClass>
<!-- this is necessary as we're not using the Boot parent -->
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>thin-jar</id>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<!-- The following enables the "thin jar" deployment option. -->
<dependency>
<groupId>org.springframework.boot.experimental</groupId>
<artifactId>spring-boot-thin-layout</artifactId>
<version>${thin.version}</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<properties>
<rest-assured.version>3.1.0</rest-assured.version>
<!-- plugins -->
<thin.version>1.0.11.RELEASE</thin.version>
<spring-boot.version>2.0.5.RELEASE</spring-boot.version>
</properties>
</project>

View File

@ -78,7 +78,7 @@
<rest-assured.version>3.1.0</rest-assured.version> <rest-assured.version>3.1.0</rest-assured.version>
<!-- plugins --> <!-- plugins -->
<thin.version>1.0.11.RELEASE</thin.version> <thin.version>1.0.11.RELEASE</thin.version>
<spring-boot.version>2.0.5.RELEASE</spring-boot.version> <spring-boot.version>2.1.1.RELEASE</spring-boot.version>
</properties> </properties>
</project> </project>

View File

@ -1,13 +1,14 @@
package com.baeldung.config; package com.baeldung.config;
import com.baeldung.services.IBarService; import java.util.Properties;
import com.baeldung.services.impl.BarSpringDataJpaService;
import com.google.common.base.Preconditions; import javax.sql.DataSource;
import com.baeldung.dao.repositories.impl.ExtendedRepositoryImpl;
import com.baeldung.services.IFooService;
import com.baeldung.services.impl.FooService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.*; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor; import org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor;
import org.springframework.data.jpa.repository.config.EnableJpaAuditing; import org.springframework.data.jpa.repository.config.EnableJpaAuditing;
@ -20,13 +21,15 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
import javax.sql.DataSource; import com.baeldung.dao.repositories.impl.ExtendedRepositoryImpl;
import java.util.Properties; import com.baeldung.services.IBarService;
import com.baeldung.services.impl.BarSpringDataJpaService;
import com.google.common.base.Preconditions;
@Configuration @Configuration
@ComponentScan({"com.baeldung.dao", "com.baeldung.services"}) @ComponentScan({ "com.baeldung.dao", "com.baeldung.services" })
@EnableTransactionManagement @EnableTransactionManagement
@EnableJpaRepositories(basePackages = {"com.baeldung.dao"}, repositoryBaseClass = ExtendedRepositoryImpl.class) @EnableJpaRepositories(basePackages = { "com.baeldung.dao" }, repositoryBaseClass = ExtendedRepositoryImpl.class)
@EnableJpaAuditing @EnableJpaAuditing
@PropertySource("classpath:persistence.properties") @PropertySource("classpath:persistence.properties")
public class PersistenceConfiguration { public class PersistenceConfiguration {
@ -79,11 +82,6 @@ public class PersistenceConfiguration {
return new BarSpringDataJpaService(); return new BarSpringDataJpaService();
} }
@Bean
public IFooService fooService() {
return new FooService();
}
private final Properties hibernateProperties() { private final Properties hibernateProperties() {
final Properties hibernateProperties = new Properties(); final Properties hibernateProperties = new Properties();
hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto")); hibernateProperties.setProperty("hibernate.hbm2ddl.auto", env.getProperty("hibernate.hbm2ddl.auto"));
@ -94,7 +92,8 @@ public class PersistenceConfiguration {
// hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true"); // hibernateProperties.setProperty("hibernate.globally_quoted_identifiers", "true");
// Envers properties // Envers properties
hibernateProperties.setProperty("org.hibernate.envers.audit_table_suffix", env.getProperty("envers.audit_table_suffix")); hibernateProperties.setProperty("org.hibernate.envers.audit_table_suffix",
env.getProperty("envers.audit_table_suffix"));
return hibernateProperties; return hibernateProperties;
} }

View File

@ -12,4 +12,6 @@ hibernate.cache.use_second_level_cache=true
hibernate.cache.use_query_cache=true hibernate.cache.use_query_cache=true
hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
spring.datasource.data=import_entities.sql spring.datasource.data=import_entities.sql
spring.main.allow-bean-definition-overriding=true

View File

@ -2,17 +2,12 @@ package org.baeldung;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import com.baeldung.Application; import com.baeldung.Application;
import com.baeldung.config.PersistenceConfiguration;
import com.baeldung.config.PersistenceProductConfiguration;
import com.baeldung.config.PersistenceUserConfiguration;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@DataJpaTest(excludeAutoConfiguration = {PersistenceConfiguration.class, PersistenceUserConfiguration.class, PersistenceProductConfiguration.class})
@SpringBootTest(classes = Application.class) @SpringBootTest(classes = Application.class)
public class SpringContextIntegrationTest { public class SpringContextIntegrationTest {

View File

@ -0,0 +1,25 @@
package org.baeldung;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringRunner;
import com.baeldung.Application;
import com.baeldung.config.PersistenceConfiguration;
import com.baeldung.config.PersistenceProductConfiguration;
import com.baeldung.config.PersistenceUserConfiguration;
@RunWith(SpringRunner.class)
@DataJpaTest(excludeAutoConfiguration = {
PersistenceConfiguration.class,
PersistenceUserConfiguration.class,
PersistenceProductConfiguration.class })
@ContextConfiguration(classes = Application.class)
public class SpringJpaContextIntegrationTest {
@Test
public void whenSpringContextIsBootstrapped_thenNoExceptions() {
}
}

View File

@ -47,21 +47,9 @@
<groupId>org.junit.jupiter</groupId> <groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId> <artifactId>junit-jupiter-api</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
<dependency> <dependency>
<groupId>org.junit.platform</groupId> <groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId> <artifactId>junit-platform-runner</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
@ -97,8 +85,6 @@
<nosqlunit.version>0.10.0</nosqlunit.version> <nosqlunit.version>0.10.0</nosqlunit.version>
<spring-data-commons.version>2.0.3.RELEASE</spring-data-commons.version> <spring-data-commons.version>2.0.3.RELEASE</spring-data-commons.version>
<embedded-redis.version>0.6</embedded-redis.version> <embedded-redis.version>0.6</embedded-redis.version>
<junit.platform.version>1.0.0</junit.platform.version>
<junit.jupiter.version>5.0.2</junit.jupiter.version>
</properties> </properties>
</project> </project>

View File

@ -324,6 +324,7 @@
<modules> <modules>
<module>parent-boot-1</module> <module>parent-boot-1</module>
<module>parent-boot-2</module> <module>parent-boot-2</module>
<module>parent-boot-2.0-temp</module>
<module>parent-spring-4</module> <module>parent-spring-4</module>
<module>parent-spring-5</module> <module>parent-spring-5</module>
<module>parent-java</module> <module>parent-java</module>
@ -520,6 +521,7 @@
<modules> <modules>
<module>parent-boot-1</module> <module>parent-boot-1</module>
<module>parent-boot-2</module> <module>parent-boot-2</module>
<module>parent-boot-2.0-temp</module>
<module>parent-spring-4</module> <module>parent-spring-4</module>
<module>parent-spring-5</module> <module>parent-spring-5</module>
<module>parent-java</module> <module>parent-java</module>
@ -878,6 +880,7 @@
<modules> <modules>
<module>parent-boot-1</module> <module>parent-boot-1</module>
<module>parent-boot-2</module> <module>parent-boot-2</module>
<module>parent-boot-2.0-temp</module>
<module>parent-spring-4</module> <module>parent-spring-4</module>
<module>parent-spring-5</module> <module>parent-spring-5</module>
<module>parent-java</module> <module>parent-java</module>
@ -1069,6 +1072,7 @@
<modules> <modules>
<module>parent-boot-1</module> <module>parent-boot-1</module>
<module>parent-boot-2</module> <module>parent-boot-2</module>
<module>parent-boot-2.0-temp</module>
<module>parent-spring-4</module> <module>parent-spring-4</module>
<module>parent-spring-5</module> <module>parent-spring-5</module>
<module>parent-java</module> <module>parent-java</module>
@ -1272,6 +1276,7 @@
<modules> <modules>
<module>parent-boot-1</module> <module>parent-boot-1</module>
<module>parent-boot-2</module> <module>parent-boot-2</module>
<module>parent-boot-2.0-temp</module>
<module>parent-spring-4</module> <module>parent-spring-4</module>
<module>parent-spring-5</module> <module>parent-spring-5</module>
<module>parent-java</module> <module>parent-java</module>

View File

@ -2,8 +2,9 @@ package com.baeldung
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.data.mongo.MongoReactiveDataAutoConfiguration
@SpringBootApplication @SpringBootApplication(exclude = arrayOf(MongoReactiveDataAutoConfiguration::class))
class Application class Application
fun main(args: Array<String>) { fun main(args: Array<String>) {

View File

@ -4,10 +4,11 @@ import javax.servlet.Filter;
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.servlet.SecurityAutoConfiguration;
import org.springframework.web.filter.DelegatingFilterProxy; import org.springframework.web.filter.DelegatingFilterProxy;
import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer; import org.springframework.web.servlet.support.AbstractAnnotationConfigDispatcherServletInitializer;
@SpringBootApplication @SpringBootApplication( exclude = SecurityAutoConfiguration.class)
public class Spring5Application { public class Spring5Application {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -2,8 +2,9 @@ package com.baeldung.springbootkotlin
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.servlet.SecurityAutoConfiguration
@SpringBootApplication(scanBasePackages = arrayOf("com.baeldung.springbootkotlin")) @SpringBootApplication(scanBasePackages = arrayOf("com.baeldung.springbootkotlin"), exclude = arrayOf(SecurityAutoConfiguration::class))
class KotlinDemoApplication class KotlinDemoApplication
fun main(args: Array<String>) { fun main(args: Array<String>) {

View File

@ -1,9 +1,7 @@
package com.baeldung.reactive.actuator; package com.baeldung.reactive.actuator;
import org.springframework.beans.factory.annotation.Autowired;
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.context.annotation.Bean;
@SpringBootApplication @SpringBootApplication
public class Spring5ReactiveApplication{ public class Spring5ReactiveApplication{

View File

@ -8,8 +8,9 @@ import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter; import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
import org.springframework.web.reactive.config.EnableWebFlux; import org.springframework.web.reactive.config.EnableWebFlux;
import org.springframework.web.server.adapter.WebHttpHandlerBuilder; import org.springframework.web.server.adapter.WebHttpHandlerBuilder;
import reactor.ipc.netty.NettyContext;
import reactor.ipc.netty.http.server.HttpServer; import reactor.netty.DisposableServer;
import reactor.netty.http.server.HttpServer;
@ComponentScan(basePackages = {"com.baeldung.reactive.security"}) @ComponentScan(basePackages = {"com.baeldung.reactive.security"})
@EnableWebFlux @EnableWebFlux
@ -18,17 +19,19 @@ public class SpringSecurity5Application {
public static void main(String[] args) { public static void main(String[] args) {
try (AnnotationConfigApplicationContext context = try (AnnotationConfigApplicationContext context =
new AnnotationConfigApplicationContext(SpringSecurity5Application.class)) { new AnnotationConfigApplicationContext(SpringSecurity5Application.class)) {
context.getBean(NettyContext.class).onClose().block(); context.getBean(DisposableServer.class).onDispose().block();
} }
} }
@Bean @Bean
public NettyContext nettyContext(ApplicationContext context) { public DisposableServer disposableServer(ApplicationContext context) {
HttpHandler handler = WebHttpHandlerBuilder.applicationContext(context) HttpHandler handler = WebHttpHandlerBuilder.applicationContext(context)
.build(); .build();
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler);
HttpServer httpServer = HttpServer.create("localhost", 8080); HttpServer httpServer = HttpServer.create();
return httpServer.newHandler(adapter).block(); httpServer.host("localhost");
httpServer.port(8080);
return httpServer.handle(adapter).bindNow();
} }
} }

View File

@ -75,6 +75,11 @@
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>
<!-- Spring WebFlux WebSession --> <!-- Spring WebFlux WebSession -->
<dependency> <dependency>
@ -116,12 +121,6 @@
<version>${project-reactor-test}</version> <version>${project-reactor-test}</version>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-runner</artifactId>
<version>${junit.platform.version}</version>
<scope>test</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
@ -145,7 +144,6 @@
<geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version> <geronimo-json_1.1_spec.version>1.0</geronimo-json_1.1_spec.version>
<commons-collections4.version>4.1</commons-collections4.version> <commons-collections4.version>4.1</commons-collections4.version>
<project-reactor-test>3.1.6.RELEASE</project-reactor-test> <project-reactor-test>3.1.6.RELEASE</project-reactor-test>
<junit.platform.version>1.2.0</junit.platform.version>
</properties> </properties>
</project> </project>

View File

@ -14,17 +14,17 @@ import reactor.core.publisher.Hooks;
@SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class) @SpringBootApplication(exclude = MongoReactiveAutoConfiguration.class)
@EnableScheduling @EnableScheduling
public class ConsumerSSEApplication { public class ConsumerDebuggingApplication {
public static void main(String[] args) { public static void main(String[] args) {
Hooks.onOperatorDebug(); Hooks.onOperatorDebug();
SpringApplication app = new SpringApplication(ConsumerSSEApplication.class); SpringApplication app = new SpringApplication(ConsumerDebuggingApplication.class);
app.setDefaultProperties(Collections.singletonMap("server.port", "8082")); app.setDefaultProperties(Collections.singletonMap("server.port", "8082"));
app.run(args); app.run(args);
} }
@Bean @Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { public SecurityWebFilterChain debuggingConsumerSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange() http.authorizeExchange()
.anyExchange() .anyExchange()
.permitAll(); .permitAll();

View File

@ -11,16 +11,16 @@ import org.springframework.web.reactive.config.EnableWebFlux;
@EnableWebFlux @EnableWebFlux
@SpringBootApplication @SpringBootApplication
public class ServerSSEApplication { public class ServerDebuggingApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication app = new SpringApplication(ServerSSEApplication.class); SpringApplication app = new SpringApplication(ServerDebuggingApplication.class);
app.setDefaultProperties(Collections.singletonMap("server.port", "8081")); app.setDefaultProperties(Collections.singletonMap("server.port", "8081"));
app.run(args); app.run(args);
} }
@Bean @Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { public SecurityWebFilterChain debuggingServerSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange() http.authorizeExchange()
.anyExchange() .anyExchange()
.permitAll(); .permitAll();

View File

@ -17,8 +17,6 @@ import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletRegistrationBean; import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.HttpHandler;
import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunction;
@ -40,11 +38,14 @@ public class FunctionalSpringBootApplication {
private RouterFunction<ServerResponse> routingFunction() { private RouterFunction<ServerResponse> routingFunction() {
FormHandler formHandler = new FormHandler(); FormHandler formHandler = new FormHandler();
RouterFunction<ServerResponse> restfulRouter = route(GET("/"), serverRequest -> ok().body(Flux.fromIterable(actors), Actor.class)).andRoute(POST("/"), serverRequest -> serverRequest.bodyToMono(Actor.class) RouterFunction<ServerResponse> restfulRouter = route(GET("/"),
.doOnNext(actors::add) serverRequest -> ok().body(Flux.fromIterable(actors), Actor.class)).andRoute(POST("/"),
.then(ok().build())); serverRequest -> serverRequest.bodyToMono(Actor.class)
.doOnNext(actors::add)
.then(ok().build()));
return route(GET("/test"), serverRequest -> ok().body(fromObject("helloworld"))).andRoute(POST("/login"), formHandler::handleLogin) return route(GET("/test"), serverRequest -> ok().body(fromObject("helloworld")))
.andRoute(POST("/login"), formHandler::handleLogin)
.andRoute(POST("/upload"), formHandler::handleUpload) .andRoute(POST("/upload"), formHandler::handleUpload)
.and(RouterFunctions.resources("/files/**", new ClassPathResource("files/"))) .and(RouterFunctions.resources("/files/**", new ClassPathResource("files/")))
.andNest(path("/actor"), restfulRouter) .andNest(path("/actor"), restfulRouter)
@ -68,5 +69,4 @@ public class FunctionalSpringBootApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(FunctionalSpringBootApplication.class, args); SpringApplication.run(FunctionalSpringBootApplication.class, args);
} }
} }

View File

@ -1,9 +1,7 @@
package com.baeldung.reactive; package com.baeldung.reactive;
import org.springframework.beans.factory.annotation.Autowired;
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.context.annotation.Bean;
@SpringBootApplication @SpringBootApplication
public class Spring5ReactiveApplication{ public class Spring5ReactiveApplication{

View File

@ -4,6 +4,9 @@ import java.util.Collections;
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.context.annotation.Bean;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@SpringBootApplication @SpringBootApplication
public class CorsOnAnnotatedElementsApplication { public class CorsOnAnnotatedElementsApplication {
@ -14,4 +17,9 @@ public class CorsOnAnnotatedElementsApplication {
app.run(args); app.run(args);
} }
@Bean
public SecurityWebFilterChain corsAnnotatedSpringSecurityFilterChain(ServerHttpSecurity http) {
http.csrf().disable();
return http.build();
}
} }

View File

@ -8,6 +8,9 @@ import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfigurat
import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration; import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration; 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 = { MongoAutoConfiguration.class, @SpringBootApplication(exclude = { MongoAutoConfiguration.class,
MongoDataAutoConfiguration.class, MongoDataAutoConfiguration.class,
@ -22,4 +25,9 @@ public class CorsGlobalConfigApplication {
app.run(args); app.run(args);
} }
@Bean
public SecurityWebFilterChain corsGlobalSpringSecurityFilterChain(ServerHttpSecurity http) {
http.csrf().disable();
return http.build();
}
} }

View File

@ -7,7 +7,7 @@ import org.springframework.web.reactive.function.server.ServerResponse;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@Component @Component
public class FunctionalHandler { public class CorsGlobalFunctionalHandler {
public Mono<ServerResponse> useHandler(final ServerRequest request) { public Mono<ServerResponse> useHandler(final ServerRequest request) {
final String responseMessage = "CORS GLOBAL CONFIG IS NOT EFFECTIVE ON FUNCTIONAL ENDPOINTS!!!"; final String responseMessage = "CORS GLOBAL CONFIG IS NOT EFFECTIVE ON FUNCTIONAL ENDPOINTS!!!";

View File

@ -8,13 +8,13 @@ import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.reactive.function.server.ServerResponse;
import com.baeldung.reactive.cors.global.functional.handlers.FunctionalHandler; import com.baeldung.reactive.cors.global.functional.handlers.CorsGlobalFunctionalHandler;
@Configuration @Configuration
public class CorsRouterFunctions { public class CorsRouterFunctions {
@Bean @Bean
public RouterFunction<ServerResponse> responseHeaderRoute(@Autowired FunctionalHandler handler) { public RouterFunction<ServerResponse> corsGlobalRouter(@Autowired CorsGlobalFunctionalHandler handler) {
return RouterFunctions.route(RequestPredicates.PUT("/global-config-on-functional/cors-disabled-functional-endpoint"), handler::useHandler); return RouterFunctions.route(RequestPredicates.PUT("/global-config-on-functional/cors-disabled-functional-endpoint"), handler::useHandler);
} }
} }

View File

@ -8,6 +8,9 @@ import org.springframework.boot.autoconfigure.data.mongo.MongoDataAutoConfigurat
import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration; import org.springframework.boot.autoconfigure.data.mongo.MongoReactiveDataAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration; import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.boot.autoconfigure.mongo.MongoReactiveAutoConfiguration; 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 = { MongoAutoConfiguration.class, @SpringBootApplication(exclude = { MongoAutoConfiguration.class,
MongoDataAutoConfiguration.class, MongoDataAutoConfiguration.class,
@ -21,5 +24,11 @@ public class CorsWebFilterApplication {
app.setDefaultProperties(Collections.singletonMap("server.port", "8083")); app.setDefaultProperties(Collections.singletonMap("server.port", "8083"));
app.run(args); app.run(args);
} }
@Bean
public SecurityWebFilterChain corsWebfilterSpringSecurityFilterChain(ServerHttpSecurity http) {
http.csrf().disable();
return http.build();
}
} }

View File

@ -14,7 +14,7 @@ import com.baeldung.reactive.cors.webfilter.functional.handlers.CorsWithWebFilte
public class CorsWithWebFilterRouterFunctions { public class CorsWithWebFilterRouterFunctions {
@Bean @Bean
public RouterFunction<ServerResponse> responseHeaderRoute(@Autowired CorsWithWebFilterHandler handler) { public RouterFunction<ServerResponse> corsWebfilterRouter(@Autowired CorsWithWebFilterHandler handler) {
return RouterFunctions.route(RequestPredicates.PUT("/web-filter-on-functional/functional-endpoint"), handler::useHandler); return RouterFunctions.route(RequestPredicates.PUT("/web-filter-on-functional/functional-endpoint"), handler::useHandler);
} }
} }

View File

@ -4,9 +4,13 @@ import java.util.Collections;
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.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@SpringBootApplication @SpringBootApplication(exclude = { RedisReactiveAutoConfiguration.class })
@EnableAsync @EnableAsync
public class ConsumerSSEApplication { public class ConsumerSSEApplication {
@ -15,5 +19,13 @@ public class ConsumerSSEApplication {
app.setDefaultProperties(Collections.singletonMap("server.port", "8082")); app.setDefaultProperties(Collections.singletonMap("server.port", "8082"));
app.run(args); app.run(args);
} }
@Bean
public SecurityWebFilterChain sseConsumerSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange()
.anyExchange()
.permitAll();
return http.build();
}
} }

View File

@ -4,14 +4,26 @@ import java.util.Collections;
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.data.redis.RedisReactiveAutoConfiguration;
import org.springframework.context.annotation.Bean;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@SpringBootApplication @SpringBootApplication(exclude = { RedisReactiveAutoConfiguration.class })
public class ServerSSEApplication { public class ServerSSEApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication app = new SpringApplication(ServerSSEApplication.class); SpringApplication app = new SpringApplication(ServerSSEApplication.class);
app.setDefaultProperties(Collections.singletonMap("server.port", "8081")); app.setDefaultProperties(Collections.singletonMap("server.port", "8081"));
app.run(args); app.run(args);
} }
@Bean
public SecurityWebFilterChain sseServerSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange()
.anyExchange()
.permitAll();
return http.build();
}
} }

View File

@ -2,6 +2,9 @@ package com.baeldung.validations.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.context.annotation.Bean;
import org.springframework.security.config.web.server.ServerHttpSecurity;
import org.springframework.security.web.server.SecurityWebFilterChain;
@SpringBootApplication @SpringBootApplication
public class FunctionalValidationsApplication { public class FunctionalValidationsApplication {
@ -9,4 +12,13 @@ public class FunctionalValidationsApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(FunctionalValidationsApplication.class, args); SpringApplication.run(FunctionalValidationsApplication.class, args);
} }
@Bean
public SecurityWebFilterChain functionalValidationsSpringSecurityFilterChain(ServerHttpSecurity http) {
http.authorizeExchange()
.anyExchange()
.permitAll();
http.csrf().disable();
return http.build();
}
} }

View File

@ -17,7 +17,7 @@ import com.baeldung.validations.functional.handlers.impl.OtherEntityValidationHa
public class ValidationsRouters { public class ValidationsRouters {
@Bean @Bean
public RouterFunction<ServerResponse> responseHeaderRoute(@Autowired CustomRequestEntityValidationHandler dryHandler, public RouterFunction<ServerResponse> validationsRouter(@Autowired CustomRequestEntityValidationHandler dryHandler,
@Autowired FunctionalHandler complexHandler, @Autowired FunctionalHandler complexHandler,
@Autowired OtherEntityValidationHandler otherHandler, @Autowired OtherEntityValidationHandler otherHandler,
@Autowired AnnotatedRequestEntityValidationHandler annotatedEntityHandler) { @Autowired AnnotatedRequestEntityValidationHandler annotatedEntityHandler) {

View File

@ -34,9 +34,8 @@ public class WebFluxSecurityConfig {
} }
@Bean @Bean
public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { public SecurityWebFilterChain webSessionSpringSecurityFilterChain(ServerHttpSecurity http) {
http http.authorizeExchange()
.authorizeExchange()
.anyExchange().authenticated() .anyExchange().authenticated()
.and() .and()
.httpBasic() .httpBasic()
@ -44,8 +43,7 @@ public class WebFluxSecurityConfig {
.and() .and()
.formLogin(); .formLogin();
http http.csrf().disable();
.csrf().disable();
return http.build(); return http.build();

View File

@ -10,6 +10,7 @@ import org.springframework.boot.web.server.WebServer;
import org.springframework.core.io.ClassPathResource; import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;

View File

@ -1,6 +1,10 @@
package com.baeldung.reactive; package com.baeldung.reactive;
import com.baeldung.web.reactive.Task; import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RequestPredicates.POST;
import java.time.Duration;
import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.springframework.http.server.reactive.HttpHandler; import org.springframework.http.server.reactive.HttpHandler;
@ -8,22 +12,22 @@ import org.springframework.http.server.reactive.ReactorHttpHandlerAdapter;
import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.reactive.function.server.ServerResponse;
import com.baeldung.web.reactive.Task;
import reactor.core.publisher.Flux; import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import reactor.ipc.netty.NettyContext; import reactor.netty.DisposableServer;
import reactor.ipc.netty.http.server.HttpServer; import reactor.netty.http.server.HttpServer;
import java.time.Duration;
import static org.springframework.web.reactive.function.server.RequestPredicates.GET;
import static org.springframework.web.reactive.function.server.RequestPredicates.POST;
public class Spring5ReactiveServerClientIntegrationTest { public class Spring5ReactiveServerClientIntegrationTest {
private static NettyContext nettyContext; private static DisposableServer disposableServer;
@BeforeAll @BeforeAll
public static void setUp() throws Exception { public static void setUp() throws Exception {
HttpServer server = HttpServer.create("localhost", 8080); HttpServer server = HttpServer.create()
.host("localhost")
.port(8080);
RouterFunction<?> route = RouterFunctions.route(POST("/task/process"), request -> ServerResponse.ok() RouterFunction<?> route = RouterFunctions.route(POST("/task/process"), request -> ServerResponse.ok()
.body(request.bodyToFlux(Task.class) .body(request.bodyToFlux(Task.class)
.map(ll -> new Task("TaskName", 1)), Task.class)) .map(ll -> new Task("TaskName", 1)), Task.class))
@ -31,13 +35,13 @@ public class Spring5ReactiveServerClientIntegrationTest {
.body(Mono.just("server is alive"), String.class))); .body(Mono.just("server is alive"), String.class)));
HttpHandler httpHandler = RouterFunctions.toHttpHandler(route); HttpHandler httpHandler = RouterFunctions.toHttpHandler(route);
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler); ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(httpHandler);
nettyContext = server.newHandler(adapter) disposableServer = server.handle(adapter)
.block(); .bindNow();
} }
@AfterAll @AfterAll
public static void shutDown() { public static void shutDown() {
nettyContext.dispose(); disposableServer.disposeNow();
} }
// @Test // @Test

View File

@ -2,13 +2,10 @@ package com.baeldung.reactive.cors;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
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;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CorsOnAnnotatedElementsLiveTest { public class CorsOnAnnotatedElementsLiveTest {

View File

@ -2,13 +2,10 @@ package com.baeldung.reactive.cors;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
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;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CorsOnGlobalConfigLiveTest { public class CorsOnGlobalConfigLiveTest {

View File

@ -2,13 +2,10 @@ package com.baeldung.reactive.cors;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
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;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class CorsOnWebFilterLiveTest { public class CorsOnWebFilterLiveTest {

View File

@ -8,11 +8,13 @@ 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.test.context.SpringBootTest.WebEnvironment; import org.springframework.boot.test.context.SpringBootTest.WebEnvironment;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
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;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT) @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
@WithMockUser
public class ErrorHandlingIntegrationTest { public class ErrorHandlingIntegrationTest {
@Autowired @Autowired

View File

@ -4,6 +4,7 @@ import org.junit.Test;
import org.junit.runner.RunWith; 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.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.EntityExchangeResult; import org.springframework.test.web.reactive.server.EntityExchangeResult;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
@ -12,6 +13,7 @@ import static org.junit.Assert.assertEquals;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@WithMockUser
public class PlayerHandlerIntegrationTest { public class PlayerHandlerIntegrationTest {
@Autowired @Autowired

View File

@ -4,6 +4,7 @@ import org.junit.Test;
import org.junit.runner.RunWith; 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.security.test.context.support.WithMockUser;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.reactive.server.EntityExchangeResult; import org.springframework.test.web.reactive.server.EntityExchangeResult;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
@ -12,6 +13,7 @@ import static org.junit.Assert.assertEquals;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@WithMockUser
public class UserControllerIntegrationTest { public class UserControllerIntegrationTest {
@Autowired @Autowired

View File

@ -2,13 +2,10 @@ package com.baeldung.reactive.responseheaders;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
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;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class ResponseHeaderLiveTest { public class ResponseHeaderLiveTest {

View File

@ -3,14 +3,13 @@ package com.baeldung.reactive.serversentsevents;
import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.function.Executable; import org.junit.jupiter.api.function.Executable;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.security.test.context.support.WithMockUser;
import org.springframework.test.web.reactive.server.WebTestClient; import org.springframework.test.web.reactive.server.WebTestClient;
@RunWith(JUnitPlatform.class)
@SpringBootTest @SpringBootTest
@WithMockUser
public class ServiceSentEventLiveTest { public class ServiceSentEventLiveTest {
private WebTestClient client = WebTestClient.bindToServer() private WebTestClient client = WebTestClient.bindToServer()

View File

@ -4,6 +4,7 @@ import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.security.test.context.support.WithMockUser;
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;
@ -12,6 +13,7 @@ import com.baeldung.reactive.controller.PathPatternController;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(classes = Spring5ReactiveApplication.class) @SpringBootTest(classes = Spring5ReactiveApplication.class)
@WithMockUser
public class PathPatternsUsingHandlerMethodIntegrationTest { public class PathPatternsUsingHandlerMethodIntegrationTest {
private static WebTestClient client; private static WebTestClient client;

View File

@ -2,9 +2,7 @@ package com.baeldung.validations.functional;
import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
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;
@ -13,7 +11,6 @@ import com.baeldung.validations.functional.model.CustomRequestEntity;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class FunctionalEndpointValidationsLiveTest { public class FunctionalEndpointValidationsLiveTest {

View File

@ -1,10 +1,10 @@
package com.baeldung.web.client; package com.baeldung.web.client;
import com.baeldung.reactive.Spring5ReactiveApplication;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
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.security.test.context.support.WithMockUser;
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.web.reactive.function.server.RequestPredicates; import org.springframework.web.reactive.function.server.RequestPredicates;
@ -12,10 +12,14 @@ import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse; import org.springframework.web.reactive.function.server.ServerResponse;
import org.springframework.web.server.WebHandler; import org.springframework.web.server.WebHandler;
import com.baeldung.reactive.Spring5ReactiveApplication;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(classes = Spring5ReactiveApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @SpringBootTest(classes = Spring5ReactiveApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
@WithMockUser
public class WebTestClientIntegrationTest { public class WebTestClientIntegrationTest {
@LocalServerPort @LocalServerPort

View File

@ -31,7 +31,7 @@
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.thymeleaf.extras</groupId> <groupId>org.thymeleaf.extras</groupId>
<artifactId>thymeleaf-extras-springsecurity4</artifactId> <artifactId>thymeleaf-extras-springsecurity5</artifactId>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>

View File

@ -1,5 +1,5 @@
<!DOCTYPE html> <!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4" lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org" xmlns:sec="http://www.thymeleaf.org/extras/spring-security" lang="en">
<head> <head>
<title>Spring Security with Extra Fields</title> <title>Spring Security with Extra Fields</title>
<meta charset="utf-8" /> <meta charset="utf-8" />

View File

@ -135,7 +135,8 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<!-- this surefire configuration allows concurrent execution; do not remove --> <!-- this surefire configuration allows concurrent execution;
do not remove -->
<plugin> <plugin>
<groupId>org.apache.maven.plugins</groupId> <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId> <artifactId>maven-surefire-plugin</artifactId>
@ -143,14 +144,6 @@
<configuration> <configuration>
<parallel>methods</parallel> <parallel>methods</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads> <useUnlimitedThreads>true</useUnlimitedThreads>
<excludes>
<exclude>**/*IntegrationTest.java</exclude>
<exclude>**/*IntTest.java</exclude>
<exclude>**/*LongRunningUnitTest.java</exclude>
<exclude>**/*ManualTest.java</exclude>
<exclude>**/JdbcTest.java</exclude>
<exclude>**/*LiveTest.java</exclude>
</excludes>
</configuration> </configuration>
</plugin> </plugin>
</plugins> </plugins>

View File

@ -6,7 +6,7 @@ import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfi
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
@SpringBootApplication(exclude = SecurityAutoConfiguration.class) @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@ComponentScan(basePackages = { "com.baeldung.execption" }) @ComponentScan(basePackages = { "com.baeldung.exception" })
public class SpringExceptionApplication { public class SpringExceptionApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(SpringExceptionApplication.class, args); SpringApplication.run(SpringExceptionApplication.class, args);

View File

@ -6,12 +6,13 @@ import java.util.Collection;
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.http.HttpMessageConverters; import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.JsonbHttpMessageConverter; import org.springframework.http.converter.json.JsonbHttpMessageConverter;
@SpringBootApplication @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
@ComponentScan(basePackages = { "com.baeldung.jsonb" }) @ComponentScan(basePackages = { "com.baeldung.jsonb" })
public class Spring5Application { public class Spring5Application {

View File

@ -2,8 +2,9 @@ package com.baeldung.restdocs;
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.servlet.SecurityAutoConfiguration;
@SpringBootApplication @SpringBootApplication(exclude = SecurityAutoConfiguration.class)
public class SpringRestDocsApplication { public class SpringRestDocsApplication {
public static void main(String[] args) { public static void main(String[] args) {

View File

@ -3,12 +3,10 @@ package com.baeldung;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest
@EnableJpaRepositories("com.baeldung.persistence")
public class Example1IntegrationTest { public class Example1IntegrationTest {
@Test @Test

View File

@ -3,12 +3,10 @@ package com.baeldung;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest @SpringBootTest
@EnableJpaRepositories("com.baeldung.persistence")
public class Example2IntegrationTest { public class Example2IntegrationTest {
@Test @Test

View File

@ -1,12 +1,11 @@
package com.baeldung.functional; package com.baeldung.functional;
import static org.junit.Assert.*; import static org.junit.Assert.assertTrue;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; 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.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.test.context.junit4.SpringRunner; import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.web.context.support.GenericWebApplicationContext; import org.springframework.web.context.support.GenericWebApplicationContext;
@ -14,7 +13,6 @@ import com.baeldung.Spring5Application;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(classes = Spring5Application.class) @SpringBootTest(classes = Spring5Application.class)
@EnableJpaRepositories("com.baeldung.persistence")
public class BeanRegistrationIntegrationTest { public class BeanRegistrationIntegrationTest {
@Autowired @Autowired

View File

@ -9,10 +9,10 @@
<description>This is simple boot application demonstrating a custom auto-configuration</description> <description>This is simple boot application demonstrating a custom auto-configuration</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<name>spring-boot-bootstrap</name> <name>spring-boot-bootstrap</name>
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -9,10 +9,10 @@
<description>This is simple boot client application for Spring boot actuator test</description> <description>This is simple boot client application for Spring boot actuator test</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -7,10 +7,10 @@
<description>Projects for Disabling Spring Boot Console Logging tutorials</description> <description>Projects for Disabling Spring Boot Console Logging tutorials</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<modules> <modules>

View File

@ -10,10 +10,10 @@
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<description>Module For Spring Boot MVC</description> <description>Module For Spring Boot MVC</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -9,10 +9,10 @@
<description>Demo project for Spring Boot</description> <description>Demo project for Spring Boot</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -12,10 +12,10 @@
<description>Demo project for Spring Boot Vue project</description> <description>Demo project for Spring Boot Vue project</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<properties> <properties>

View File

@ -8,10 +8,10 @@
<description>This is simple boot application for Spring boot actuator test</description> <description>This is simple boot application for Spring boot actuator test</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -11,10 +11,10 @@
<description>Example ETL Load Project</description> <description>Example ETL Load Project</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-2</relativePath> <relativePath>../../../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<properties> <properties>

View File

@ -12,10 +12,10 @@
<description>Example transform ETL step</description> <description>Example transform ETL step</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../../../parent-boot-2</relativePath> <relativePath>../../../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<properties> <properties>

View File

@ -12,9 +12,9 @@
<parent> <parent>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-2</relativePath> <relativePath>../../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<!-- <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <!-- <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId>

View File

@ -10,10 +10,10 @@
<description>Intro to Spring Data REST</description> <description>Intro to Spring Data REST</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -9,10 +9,10 @@
<description>spring forms examples using thymeleaf</description> <description>spring forms examples using thymeleaf</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -7,10 +7,10 @@
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<description>A simple project to demonstrate Spring REST Shell features.</description> <description>A simple project to demonstrate Spring REST Shell features.</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<packaging>jar</packaging> <packaging>jar</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -7,10 +7,10 @@
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -8,10 +8,10 @@
<packaging>war</packaging> <packaging>war</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -11,10 +11,10 @@
<description>Spring Security MVC Boot</description> <description>Spring Security MVC Boot</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -9,10 +9,10 @@
<description>Spring OpenID sample project</description> <description>Spring OpenID sample project</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -9,10 +9,10 @@
<packaging>pom</packaging> <packaging>pom</packaging>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<modules> <modules>

View File

@ -11,10 +11,10 @@
<description>Spring Security with Thymeleaf tutorial</description> <description>Spring Security with Thymeleaf tutorial</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -15,10 +15,10 @@
</properties> </properties>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../../parent-boot-2</relativePath> <relativePath>../../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -13,10 +13,10 @@
<description>Spring Vault sample project</description> <description>Spring Vault sample project</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -11,10 +11,10 @@
<description>Spring WebFlux AMQP Sample</description> <description>Spring WebFlux AMQP Sample</description>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>

View File

@ -10,10 +10,10 @@
<name>Vaadin</name> <name>Vaadin</name>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencyManagement> <dependencyManagement>

View File

@ -7,10 +7,10 @@
<name>vavr</name> <name>vavr</name>
<parent> <parent>
<artifactId>parent-boot-2</artifactId> <artifactId>parent-boot-2.0-temp</artifactId>
<groupId>com.baeldung</groupId> <groupId>com.baeldung</groupId>
<version>0.0.1-SNAPSHOT</version> <version>0.0.1-SNAPSHOT</version>
<relativePath>../parent-boot-2</relativePath> <relativePath>../parent-boot-2.0-temp</relativePath>
</parent> </parent>
<dependencies> <dependencies>