From bdc1d2c840209e10fb5757b20c547f2e789e018e Mon Sep 17 00:00:00 2001 From: jsgrah-spring Date: Tue, 27 Sep 2022 21:29:47 +0200 Subject: [PATCH 1/3] JAVA-13403. Upgrade the maven-pmd-plugin from the main pom to the latest version 3.19.0 and remove any overridden versions for this plugin from the repo. --- pom.xml | 2 +- spring-jinq/src/main/resources/application.properties | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index b7c414fb0e..f21db3ced5 100644 --- a/pom.xml +++ b/pom.xml @@ -983,7 +983,7 @@ spring-jenkins-pipeline spring-jersey - + spring-jinq spring-jms spring-kafka diff --git a/spring-jinq/src/main/resources/application.properties b/spring-jinq/src/main/resources/application.properties index c9440b3b45..78ccab7914 100644 --- a/spring-jinq/src/main/resources/application.properties +++ b/spring-jinq/src/main/resources/application.properties @@ -1,7 +1,8 @@ -spring.datasource.url=jdbc:h2:~/jinq;;DB_CLOSE_ON_EXIT=FALSE +spring.datasource.url=jdbc:h2:~/jinq;DB_CLOSE_ON_EXIT=FALSE spring.datasource.username=sa spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.show-sql=true -spring.jpa.properties.hibernate.format_sql=true \ No newline at end of file +spring.jpa.properties.hibernate.format_sql=true +spring.jpa.properties.hibernate.globally_quoted_identifiers=true \ No newline at end of file From 0868ef8f9018c8e6bb820485cb35f2fb40c62279 Mon Sep 17 00:00:00 2001 From: jsgrah-spring Date: Tue, 27 Sep 2022 21:35:27 +0200 Subject: [PATCH 2/3] JAVA-14662. Fix spring-jinq module to work with the latest Boot 2.7.x and uncomment the module from main pom. Make Hibernate globally escape all database identifiers. PS: The previous commit comment was incorrect. --- spring-jinq/src/main/resources/application.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-jinq/src/main/resources/application.properties b/spring-jinq/src/main/resources/application.properties index 78ccab7914..c0271c65da 100644 --- a/spring-jinq/src/main/resources/application.properties +++ b/spring-jinq/src/main/resources/application.properties @@ -5,4 +5,4 @@ spring.datasource.password= spring.jpa.hibernate.ddl-auto=create-drop spring.jpa.show-sql=true spring.jpa.properties.hibernate.format_sql=true -spring.jpa.properties.hibernate.globally_quoted_identifiers=true \ No newline at end of file +spring.jpa.properties.hibernate.globally_quoted_identifiers=true From 67e6f6bdc7d2a9a2290659eae73b0154e4b19d35 Mon Sep 17 00:00:00 2001 From: jsgrah-spring Date: Tue, 4 Oct 2022 12:26:47 +0200 Subject: [PATCH 3/3] JAVA-14662. Fix spring-jinq module to work with the latest Boot 2.7.x. Update tests and annotations. --- .../src/test/java/com/baeldung/SpringContextTest.java | 6 ++---- .../repositories/CarRepositoryIntegrationTest.java | 11 +++-------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/spring-jinq/src/test/java/com/baeldung/SpringContextTest.java b/spring-jinq/src/test/java/com/baeldung/SpringContextTest.java index 86c529e574..1a486d1003 100644 --- a/spring-jinq/src/test/java/com/baeldung/SpringContextTest.java +++ b/spring-jinq/src/test/java/com/baeldung/SpringContextTest.java @@ -1,13 +1,11 @@ package com.baeldung; -import org.junit.Test; -import org.junit.runner.RunWith; +import com.baeldung.spring.jinq.JinqApplication; +import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.context.junit4.SpringRunner; import com.baeldung.spring.jinq.JinqApplication; -@RunWith(SpringRunner.class) @SpringBootTest(classes = JinqApplication.class) public class SpringContextTest { diff --git a/spring-jinq/src/test/java/com/baeldung/spring/jinq/repositories/CarRepositoryIntegrationTest.java b/spring-jinq/src/test/java/com/baeldung/spring/jinq/repositories/CarRepositoryIntegrationTest.java index 9cb126cbaa..21effd5d9b 100644 --- a/spring-jinq/src/test/java/com/baeldung/spring/jinq/repositories/CarRepositoryIntegrationTest.java +++ b/spring-jinq/src/test/java/com/baeldung/spring/jinq/repositories/CarRepositoryIntegrationTest.java @@ -2,16 +2,11 @@ package com.baeldung.spring.jinq.repositories; import static org.assertj.core.api.Assertions.assertThat; -import org.junit.Test; -import org.junit.runner.RunWith; +import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.boot.test.context.SpringBootTest; -import com.baeldung.spring.jinq.JinqApplication; - -@ContextConfiguration(classes = JinqApplication.class) -@RunWith(SpringJUnit4ClassRunner.class) +@SpringBootTest public class CarRepositoryIntegrationTest { @Autowired