From dcf6d3a538b2009805b28e4d18316a058f4e9be0 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 21:18:18 +0100 Subject: [PATCH 01/18] BAEL-20663: Upgrade to the latest Spring Boot 2.2.2 version --- parent-boot-2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parent-boot-2/pom.xml b/parent-boot-2/pom.xml index 881a0f1d67..43911a26ad 100644 --- a/parent-boot-2/pom.xml +++ b/parent-boot-2/pom.xml @@ -79,7 +79,7 @@ 3.3.0 1.0.22.RELEASE - 2.1.9.RELEASE + 2.2.2.RELEASE From 5917c9027ac4295b680f1dbd2c074c300faa8b91 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 21:41:00 +0100 Subject: [PATCH 02/18] BAEL-20663: Fix usage of org.springframework.data.domain.Sort --- .../java/com/baeldung/boot/daos/UserRepositoryCommon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java index 17ee6a94ba..b2581b8034 100644 --- a/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java +++ b/persistence-modules/spring-data-jpa/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java @@ -266,7 +266,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); assertThat(usersSortByName.get(0) .getName()).isEqualTo(USER_NAME_ADAM); @@ -278,7 +278,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)")); From fc225870094b23fc80788e3eea91bbc21651b004 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 21:52:41 +0100 Subject: [PATCH 03/18] BAEL-20663: Fix usage of org.springframework.data.domain.Sort --- .../java/com/baeldung/boot/daos/UserRepositoryCommon.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java index 17ee6a94ba..b2581b8034 100644 --- a/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java +++ b/persistence-modules/spring-data-jpa-3/src/test/java/com/baeldung/boot/daos/UserRepositoryCommon.java @@ -266,7 +266,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - List usersSortByName = userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + List usersSortByName = userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); assertThat(usersSortByName.get(0) .getName()).isEqualTo(USER_NAME_ADAM); @@ -278,7 +278,7 @@ public class UserRepositoryCommon { userRepository.save(new User(USER_NAME_PETER, LocalDate.now(), USER_EMAIL2, ACTIVE_STATUS)); userRepository.save(new User("SAMPLE", LocalDate.now(), USER_EMAIL3, INACTIVE_STATUS)); - userRepository.findAll(new Sort(Sort.Direction.ASC, "name")); + userRepository.findAll(Sort.by(Sort.Direction.ASC, "name")); List usersSortByNameLength = userRepository.findAll(Sort.by("LENGTH(name)")); From 80741d0d31e64426af18bf3e4b292aece96d07e6 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 21:58:14 +0100 Subject: [PATCH 04/18] BAEL-20663: Fix usage of org.springframework.data.domain.Sort --- .../services/impl/EmployeeServicesWithKeyValueTemplate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java index 3eb1d0f66a..fe3c332f33 100644 --- a/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java +++ b/persistence-modules/spring-data-keyvalue/src/main/java/com/baeldung/spring/data/keyvalue/services/impl/EmployeeServicesWithKeyValueTemplate.java @@ -49,7 +49,7 @@ public class EmployeeServicesWithKeyValueTemplate implements EmployeeService { @Override public Iterable getSortedListOfEmployeesBySalary() { KeyValueQuery query = new KeyValueQuery(); - query.setSort(new Sort(Sort.Direction.DESC, "salary")); + query.setSort(Sort.by(Sort.Direction.DESC, "salary")); return keyValueTemplate.find(query, Employee.class); } From 36703c7d979bc640c380750a698cb596741c50d1 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 22:11:12 +0100 Subject: [PATCH 05/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-5 --- spring-5/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-5/pom.xml b/spring-5/pom.xml index eadfb5e512..a242c29933 100644 --- a/spring-5/pom.xml +++ b/spring-5/pom.xml @@ -149,6 +149,7 @@ + 2.1.9.RELEASE 1.0 1.5.6 4.1 From ec427071248e45b392ea1d6796bff89a55b6d358 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Tue, 7 Jan 2020 22:35:03 +0100 Subject: [PATCH 06/18] BAEL-20663: Remove usage of removed @WebMvcTest#secure property --- .../com/baeldung/springbootmvc/LoginControllerUnitTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java b/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java index 68229f459c..8ccf451e86 100644 --- a/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java +++ b/spring-boot-mvc/src/test/java/com/baeldung/springbootmvc/LoginControllerUnitTest.java @@ -15,7 +15,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders; import com.baeldung.springbootmvc.config.CustomMessageSourceConfiguration; @RunWith(SpringRunner.class) -@WebMvcTest(value = LoginController.class, secure = false) +@WebMvcTest(value = LoginController.class) @ContextConfiguration(classes = { SpringBootMvcApplication.class, CustomMessageSourceConfiguration.class }) public class LoginControllerUnitTest { From 3fc3ab33edec71f9663dc9288fc10f51eb4e19bd Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Wed, 8 Jan 2020 07:49:05 +0100 Subject: [PATCH 07/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-boot-rest --- spring-boot-rest/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-rest/pom.xml b/spring-boot-rest/pom.xml index 10dacf99e8..2483aab6be 100644 --- a/spring-boot-rest/pom.xml +++ b/spring-boot-rest/pom.xml @@ -95,6 +95,7 @@ 27.0.1-jre 1.4.11.1 2.3.5 + 2.1.9.RELEASE From c46951aa6ba4c5a443eb4fa8c2f514a7fa898412 Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Wed, 8 Jan 2020 08:37:06 +0100 Subject: [PATCH 08/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-boot-testing --- spring-boot-testing/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-boot-testing/pom.xml b/spring-boot-testing/pom.xml index 5f358072d3..ffbf665a31 100644 --- a/spring-boot-testing/pom.xml +++ b/spring-boot-testing/pom.xml @@ -132,6 +132,7 @@ 1.2-groovy-2.4 1.6 0.7.2 + 2.1.9.RELEASE From 43f2f42201e29a1c716d0b9a2a73e96f8970d764 Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Wed, 8 Jan 2020 09:06:42 +0100 Subject: [PATCH 09/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-jooq --- spring-jooq/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/spring-jooq/pom.xml b/spring-jooq/pom.xml index 620172f2a1..f3b8cce8dc 100644 --- a/spring-jooq/pom.xml +++ b/spring-jooq/pom.xml @@ -194,6 +194,7 @@ 1.5 1.0.0 org.jooq.example.spring.Application + 2.1.9.RELEASE \ No newline at end of file From 6a2d89855efd1fc93513e1d25e450f94274d3c50 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Thu, 9 Jan 2020 20:56:28 +0100 Subject: [PATCH 10/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-mvc-java --- spring-mvc-java/pom.xml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-mvc-java/pom.xml b/spring-mvc-java/pom.xml index 079a664a5d..0f3a1d65b9 100644 --- a/spring-mvc-java/pom.xml +++ b/spring-mvc-java/pom.xml @@ -223,6 +223,8 @@ + 2.1.9.RELEASE + 3.0.9.RELEASE From f373c922dd657b5c261e7b4fe91a2cb594014910 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Thu, 9 Jan 2020 22:39:04 +0100 Subject: [PATCH 11/18] BAEL-20663: Replace depracated PageRequest constructor with a static method --- .../main/java/org/baeldung/web/service/StudentServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java b/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java index c7bcdc5bd5..fdba0c0c2c 100644 --- a/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java +++ b/spring-rest-angular/src/main/java/org/baeldung/web/service/StudentServiceImpl.java @@ -15,7 +15,7 @@ public class StudentServiceImpl implements StudentService { @Override public Page findPaginated(int page, int size) { - return dao.findAll(new PageRequest(page, size)); + return dao.findAll(PageRequest.of(page, size)); } } From c46beaa211b6d37ec756f0751c69c51ade6d4db8 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Thu, 9 Jan 2020 23:26:54 +0100 Subject: [PATCH 12/18] BAEL-20663: Replace depracated PageRequest constructor with a static method --- .../relationships/SpringDataWithSecurityIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java b/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java index bd0c14ca1f..41f220df6f 100644 --- a/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java +++ b/spring-security-modules/spring-security-mvc-boot/src/test/java/com/baeldung/relationships/SpringDataWithSecurityIntegrationTest.java @@ -82,7 +82,7 @@ public class SpringDataWithSecurityIntegrationTest { .setAuthentication(auth); Page page = null; do { - page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5)); + page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5)); for (Tweet twt : page.getContent()) { isTrue((twt.getOwner() == appUser.getUsername()) || (twt.getLikes() .contains(appUser.getUsername())), "I do not have any Tweets"); @@ -94,7 +94,7 @@ public class SpringDataWithSecurityIntegrationTest { public void givenNoAppUser_whenPaginatedResultsRetrievalAttempted_shouldFail() { Page page = null; do { - page = tweetRepository.getMyTweetsAndTheOnesILiked(new PageRequest(page != null ? page.getNumber() + 1 : 0, 5)); + page = tweetRepository.getMyTweetsAndTheOnesILiked(PageRequest.of(page != null ? page.getNumber() + 1 : 0, 5)); } while (page != null && page.hasNext()); } } From 5e3638010dbb34b1b5300d7b8429342aa296ab1c Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Fri, 10 Jan 2020 14:35:32 +0100 Subject: [PATCH 13/18] BAEL-20663: Fix springdoc issue: https://github.com/springdoc/springdoc-openapi/issues/133 --- spring-boot-springdoc/pom.xml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/spring-boot-springdoc/pom.xml b/spring-boot-springdoc/pom.xml index 8c35e38ae6..8d7284ccbd 100644 --- a/spring-boot-springdoc/pom.xml +++ b/spring-boot-springdoc/pom.xml @@ -17,6 +17,7 @@ + 1.8 @@ -36,12 +37,23 @@ org.springdoc springdoc-openapi-core - 1.1.45 + 1.1.49 + + + io.github.classgraph + classgraph + + org.springdoc springdoc-openapi-ui - 1.1.45 + 1.1.49 + + + io.github.classgraph + classgraph + 4.8.44 @@ -62,7 +74,7 @@ org.springframework.boot spring-boot-maven-plugin - 2.1.8.RELEASE + 2.2.2.RELEASE pre-integration-test From 80aa878f3ca88805efed3b36d6337deb4a859e5a Mon Sep 17 00:00:00 2001 From: Krzysztof Woyke Date: Fri, 10 Jan 2020 15:25:12 +0100 Subject: [PATCH 14/18] BAEL-20663: Upgrade Spring Framework version to 5.2.2 --- spring-core-2/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-core-2/pom.xml b/spring-core-2/pom.xml index 78b94880d0..4d474d8b2c 100644 --- a/spring-core-2/pom.xml +++ b/spring-core-2/pom.xml @@ -203,7 +203,7 @@ com.baeldung.sample.App - 5.0.6.RELEASE + 5.2.2.RELEASE 1.3.2 5.2.5.Final From bff2320290b8a313602c118028778f1e499fc968 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Sat, 11 Jan 2020 23:30:33 +0100 Subject: [PATCH 15/18] BAEL-20663: Upgrade spring-cloud-dependencies to Hoxton.SR1 --- .../kubernetes-guide/client-service/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml index e5f76d5d9c..07de78a92e 100644 --- a/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml +++ b/spring-cloud/spring-cloud-kubernetes/kubernetes-guide/client-service/pom.xml @@ -89,7 +89,7 @@ - Finchley.SR2 + Hoxton.SR1 1.0.0.RELEASE From 3b66c40c05c5085d24fcb19bb744e3677d21d17d Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Sat, 11 Jan 2020 23:38:32 +0100 Subject: [PATCH 16/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-data-redis --- persistence-modules/spring-data-redis/pom.xml | 1 + 1 file changed, 1 insertion(+) diff --git a/persistence-modules/spring-data-redis/pom.xml b/persistence-modules/spring-data-redis/pom.xml index a304108fee..f2095b937a 100644 --- a/persistence-modules/spring-data-redis/pom.xml +++ b/persistence-modules/spring-data-redis/pom.xml @@ -101,6 +101,7 @@ 0.10.0 2.0.3.RELEASE 0.6 + 2.1.9.RELEASE From c17be9595c75f4b055c9a7c4d94ada53616a8a46 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Sat, 11 Jan 2020 23:48:55 +0100 Subject: [PATCH 17/18] BAEL-20663: Temporarly downgrade Spring Boot to 2.1.9 in spring-boot-admin --- spring-boot-admin/pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/spring-boot-admin/pom.xml b/spring-boot-admin/pom.xml index ab2b92102c..e4b2764a3b 100644 --- a/spring-boot-admin/pom.xml +++ b/spring-boot-admin/pom.xml @@ -11,6 +11,7 @@ com.baeldung parent-boot-2 0.0.1-SNAPSHOT + ../parent-boot-2 @@ -18,4 +19,8 @@ spring-boot-admin-client + + 2.1.9.RELEASE + + From 23798f29899004a229337c05b17101a281fdbc48 Mon Sep 17 00:00:00 2001 From: Krzysiek Date: Sat, 11 Jan 2020 23:57:03 +0100 Subject: [PATCH 18/18] BAEL-20663: Update dependencies in spring-boot-security module --- spring-boot-security/pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spring-boot-security/pom.xml b/spring-boot-security/pom.xml index 62c04b4dc3..c9113e263f 100644 --- a/spring-boot-security/pom.xml +++ b/spring-boot-security/pom.xml @@ -22,12 +22,12 @@ org.springframework.security.oauth spring-security-oauth2 - 2.3.3.RELEASE + 2.4.0.RELEASE org.springframework.security.oauth.boot spring-security-oauth2-autoconfigure - 2.1.2.RELEASE + 2.2.2.RELEASE org.springframework.boot @@ -64,7 +64,7 @@ org.springframework.boot spring-boot-autoconfigure - 2.1.1.RELEASE +