From ef5ea0f77c228e0fb5d6862e99a553f8c55ab765 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Sun, 17 May 2020 11:31:38 +0530 Subject: [PATCH 1/4] JAVA-941: Migrate spring-jinq to parent-boot-2 --- spring-jinq/pom.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spring-jinq/pom.xml b/spring-jinq/pom.xml index 29fc3605d7..96cff4b886 100644 --- a/spring-jinq/pom.xml +++ b/spring-jinq/pom.xml @@ -9,9 +9,9 @@ com.baeldung - parent-boot-1 + parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 @@ -31,6 +31,11 @@ org.hibernate hibernate-entitymanager + + + org.springframework.boot + spring-boot-starter-data-jpa + From 78683ecf0c323d6cf26be7e19aff0dcb1f859044 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Wed, 20 May 2020 11:46:37 +0530 Subject: [PATCH 2/4] JAVA-940: Migrate spring-jenkins-pipeline to parent-boot-2 --- spring-jenkins-pipeline/pom.xml | 4 ++-- .../test/java/com/baeldung/SomeIntegrationTest.java | 2 +- .../src/test/java/com/baeldung/TestMongoConfig.java | 11 ----------- 3 files changed, 3 insertions(+), 14 deletions(-) delete mode 100644 spring-jenkins-pipeline/src/test/java/com/baeldung/TestMongoConfig.java diff --git a/spring-jenkins-pipeline/pom.xml b/spring-jenkins-pipeline/pom.xml index aa6008162c..38d4ed15de 100644 --- a/spring-jenkins-pipeline/pom.xml +++ b/spring-jenkins-pipeline/pom.xml @@ -10,9 +10,9 @@ com.baeldung - parent-boot-1 + parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 diff --git a/spring-jenkins-pipeline/src/test/java/com/baeldung/SomeIntegrationTest.java b/spring-jenkins-pipeline/src/test/java/com/baeldung/SomeIntegrationTest.java index 477a7d2adb..9033d10c5d 100644 --- a/spring-jenkins-pipeline/src/test/java/com/baeldung/SomeIntegrationTest.java +++ b/spring-jenkins-pipeline/src/test/java/com/baeldung/SomeIntegrationTest.java @@ -13,7 +13,7 @@ import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import static org.junit.Assert.assertNotEquals; @RunWith(SpringJUnit4ClassRunner.class) -@SpringBootTest(classes = {SpringJenkinsPipelineApplication.class, TestMongoConfig.class }) +@SpringBootTest(classes = {SpringJenkinsPipelineApplication.class}) public class SomeIntegrationTest { @Autowired private StudentRepository studentRepository; diff --git a/spring-jenkins-pipeline/src/test/java/com/baeldung/TestMongoConfig.java b/spring-jenkins-pipeline/src/test/java/com/baeldung/TestMongoConfig.java deleted file mode 100644 index a85491cf7e..0000000000 --- a/spring-jenkins-pipeline/src/test/java/com/baeldung/TestMongoConfig.java +++ /dev/null @@ -1,11 +0,0 @@ -package com.baeldung; - -import org.springframework.boot.autoconfigure.EnableAutoConfiguration; -import org.springframework.boot.autoconfigure.mongo.embedded.EmbeddedMongoAutoConfiguration; -import org.springframework.context.annotation.Configuration; - -@Configuration -@EnableAutoConfiguration(exclude = { EmbeddedMongoAutoConfiguration.class }) -public class TestMongoConfig { - -} \ No newline at end of file From 5f8f1873ae94951580c0c0769fd97f5f555ac3ef Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Wed, 20 May 2020 23:21:40 +0530 Subject: [PATCH 3/4] JAVA-941: Migrate spring-jinq to parent-boot-2 --- spring-jinq/pom.xml | 9 ++++++++- spring-jinq/src/main/resources/application.properties | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/spring-jinq/pom.xml b/spring-jinq/pom.xml index 96cff4b886..073808823c 100644 --- a/spring-jinq/pom.xml +++ b/spring-jinq/pom.xml @@ -36,6 +36,12 @@ org.springframework.boot spring-boot-starter-data-jpa + + + net.bytebuddy + byte-buddy-dep + ${bytebuddy.version} + @@ -66,7 +72,8 @@ - 1.8.22 + 1.8.29 + 1.10.10 diff --git a/spring-jinq/src/main/resources/application.properties b/spring-jinq/src/main/resources/application.properties index dc73bed0c5..c9440b3b45 100644 --- a/spring-jinq/src/main/resources/application.properties +++ b/spring-jinq/src/main/resources/application.properties @@ -1,4 +1,4 @@ -spring.datasource.url=jdbc:h2:~/jinq +spring.datasource.url=jdbc:h2:~/jinq;;DB_CLOSE_ON_EXIT=FALSE spring.datasource.username=sa spring.datasource.password= From e8531ef7c289ac94d92861bedfdd35d663bb1a7b Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Fri, 22 May 2020 12:08:56 +0530 Subject: [PATCH 4/4] JAVA-939: Migrate spring-data-rest-querydsl to parent-boot-2 --- spring-data-rest-querydsl/pom.xml | 4 ++-- .../com/baeldung/controller/repository/AddressRepository.java | 4 ++-- .../com/baeldung/controller/repository/UserRepository.java | 4 ++-- .../com/baeldung/springdatarestquerydsl/IntegrationTest.java | 4 +--- .../springdatarestquerydsl/QuerydslIntegrationTest.java | 4 +--- 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/spring-data-rest-querydsl/pom.xml b/spring-data-rest-querydsl/pom.xml index c0ad43fe0b..5e47f4979e 100644 --- a/spring-data-rest-querydsl/pom.xml +++ b/spring-data-rest-querydsl/pom.xml @@ -9,9 +9,9 @@ com.baeldung - parent-boot-1 + parent-boot-2 0.0.1-SNAPSHOT - ../parent-boot-1 + ../parent-boot-2 diff --git a/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/AddressRepository.java b/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/AddressRepository.java index 2e88820c98..476a11ea6b 100644 --- a/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/AddressRepository.java +++ b/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/AddressRepository.java @@ -5,13 +5,13 @@ import com.baeldung.entity.QAddress; import com.querydsl.core.types.dsl.StringExpression; import com.querydsl.core.types.dsl.StringPath; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.querydsl.QueryDslPredicateExecutor; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer; import org.springframework.data.querydsl.binding.QuerydslBindings; import org.springframework.data.querydsl.binding.SingleValueBinding; public interface AddressRepository - extends JpaRepository, QueryDslPredicateExecutor
, QuerydslBinderCustomizer { + extends JpaRepository, QuerydslPredicateExecutor
, QuerydslBinderCustomizer { @Override default void customize(final QuerydslBindings bindings, final QAddress root) { bindings.bind(String.class).first((SingleValueBinding) StringExpression::eq); diff --git a/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/UserRepository.java b/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/UserRepository.java index 98ff2ac5e3..b5f32b3624 100644 --- a/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/UserRepository.java +++ b/spring-data-rest-querydsl/src/main/java/com/baeldung/controller/repository/UserRepository.java @@ -5,13 +5,13 @@ import com.baeldung.entity.User; import com.querydsl.core.types.dsl.StringExpression; import com.querydsl.core.types.dsl.StringPath; import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.querydsl.QueryDslPredicateExecutor; +import org.springframework.data.querydsl.QuerydslPredicateExecutor; import org.springframework.data.querydsl.binding.QuerydslBinderCustomizer; import org.springframework.data.querydsl.binding.QuerydslBindings; import org.springframework.data.querydsl.binding.SingleValueBinding; public interface UserRepository - extends JpaRepository, QueryDslPredicateExecutor, QuerydslBinderCustomizer { + extends JpaRepository, QuerydslPredicateExecutor, QuerydslBinderCustomizer { @Override default void customize(final QuerydslBindings bindings, final QUser root) { bindings.bind(String.class).first((SingleValueBinding) StringExpression::eq); diff --git a/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/IntegrationTest.java b/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/IntegrationTest.java index 2d3dbc4c74..ad19c441b6 100644 --- a/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/IntegrationTest.java +++ b/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/IntegrationTest.java @@ -13,8 +13,6 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import java.nio.charset.Charset; - import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -24,7 +22,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. public class IntegrationTest { final MediaType contentType = - new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); + new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype()); @Autowired private WebApplicationContext webApplicationContext; diff --git a/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/QuerydslIntegrationTest.java b/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/QuerydslIntegrationTest.java index 11e5ffca05..768d28347b 100644 --- a/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/QuerydslIntegrationTest.java +++ b/spring-data-rest-querydsl/src/test/java/com/baeldung/springdatarestquerydsl/QuerydslIntegrationTest.java @@ -13,8 +13,6 @@ import org.springframework.test.web.servlet.MockMvc; import org.springframework.test.web.servlet.setup.MockMvcBuilders; import org.springframework.web.context.WebApplicationContext; -import java.nio.charset.Charset; - import static org.hamcrest.Matchers.hasSize; import static org.hamcrest.Matchers.is; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; @@ -26,7 +24,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers. public class QuerydslIntegrationTest { final MediaType contentType = - new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype(), Charset.forName("utf8")); + new MediaType(MediaType.APPLICATION_JSON.getType(), MediaType.APPLICATION_JSON.getSubtype()); @Autowired private WebApplicationContext webApplicationContext;