From b798326b2960404c7c2438c1c814655e034d3190 Mon Sep 17 00:00:00 2001 From: Seun Matt Date: Wed, 24 Apr 2019 16:05:24 +0100 Subject: [PATCH] improvement BAEL-2897 (#6795) * added example code for BAEL-2083 * updated example code for BAEL-2083 * added example code for BAEL-2849 * updated the example code with data.sql * improvement BAEL-2897 * updated the persistence module * updated readme --- persistence-modules/pom.xml | 2 +- .../.gitignore | 0 .../{spring-boot-h2 => spring-boot-persistence-h2}/README.md | 1 + .../pom.xml | 2 +- .../baeldung/h2db/auto/configuration/AutoConfigurationDemo.java | 0 .../java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java | 0 .../main/java/com/baeldung/h2db/demo/server/SpringBootApp.java | 0 .../com/baeldung/h2db/springboot/SpringBootH2Application.java | 0 .../java/com/baeldung/h2db/springboot/daos/UserRepository.java | 0 .../src/main/java/com/baeldung/h2db/springboot/models/User.java | 0 .../src/main/resources/application.properties | 0 .../src/main/resources/data.sql | 0 .../src/test/java/com/baeldung/SpringBootH2IntegrationTest.java | 0 .../test/java/com/baeldung/SpringContextIntegrationTest.java | 0 14 files changed, 3 insertions(+), 2 deletions(-) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/.gitignore (100%) rename persistence-modules/{spring-boot-h2 => spring-boot-persistence-h2}/README.md (67%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/pom.xml (97%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/auto/configuration/AutoConfigurationDemo.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/demo/server/SpringBootApp.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/springboot/SpringBootH2Application.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/springboot/daos/UserRepository.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/java/com/baeldung/h2db/springboot/models/User.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/resources/application.properties (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/main/resources/data.sql (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java (100%) rename persistence-modules/{spring-boot-h2/spring-boot-h2-database => spring-boot-persistence-h2}/src/test/java/com/baeldung/SpringContextIntegrationTest.java (100%) diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml index ee55325b20..67a5c36fed 100644 --- a/persistence-modules/pom.xml +++ b/persistence-modules/pom.xml @@ -35,7 +35,7 @@ querydsl redis solr - spring-boot-h2/spring-boot-h2-database + spring-boot-persistence-h2 spring-boot-persistence spring-boot-persistence-mongodb spring-data-cassandra diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/.gitignore b/persistence-modules/spring-boot-persistence-h2/.gitignore similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/.gitignore rename to persistence-modules/spring-boot-persistence-h2/.gitignore diff --git a/persistence-modules/spring-boot-h2/README.md b/persistence-modules/spring-boot-persistence-h2/README.md similarity index 67% rename from persistence-modules/spring-boot-h2/README.md rename to persistence-modules/spring-boot-persistence-h2/README.md index af5f395440..377b7c8939 100644 --- a/persistence-modules/spring-boot-h2/README.md +++ b/persistence-modules/spring-boot-persistence-h2/README.md @@ -1,2 +1,3 @@ ### Relevant Articles: - [Access the Same In-Memory H2 Database in Multiple Spring Boot Applications](https://www.baeldung.com/spring-boot-access-h2-database-multiple-apps) +- [Spring Boot With H2 Database](https://www.baeldung.com/spring-boot-h2-database) \ No newline at end of file diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml b/persistence-modules/spring-boot-persistence-h2/pom.xml similarity index 97% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml rename to persistence-modules/spring-boot-persistence-h2/pom.xml index 882b88b535..4c8073ddb4 100644 --- a/persistence-modules/spring-boot-h2/spring-boot-h2-database/pom.xml +++ b/persistence-modules/spring-boot-persistence-h2/pom.xml @@ -14,7 +14,7 @@ parent-boot-2 com.baeldung 0.0.1-SNAPSHOT - ../../../parent-boot-2 + ../../parent-boot-2 diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/auto/configuration/AutoConfigurationDemo.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/auto/configuration/AutoConfigurationDemo.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/auto/configuration/AutoConfigurationDemo.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/auto/configuration/AutoConfigurationDemo.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/demo/client/ClientSpringBootApp.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/demo/server/SpringBootApp.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/demo/server/SpringBootApp.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/demo/server/SpringBootApp.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/demo/server/SpringBootApp.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/SpringBootH2Application.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/SpringBootH2Application.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/SpringBootH2Application.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/SpringBootH2Application.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/daos/UserRepository.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/daos/UserRepository.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/daos/UserRepository.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/daos/UserRepository.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/models/User.java b/persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/models/User.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/java/com/baeldung/h2db/springboot/models/User.java rename to persistence-modules/spring-boot-persistence-h2/src/main/java/com/baeldung/h2db/springboot/models/User.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/resources/application.properties b/persistence-modules/spring-boot-persistence-h2/src/main/resources/application.properties similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/resources/application.properties rename to persistence-modules/spring-boot-persistence-h2/src/main/resources/application.properties diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/resources/data.sql b/persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/main/resources/data.sql rename to persistence-modules/spring-boot-persistence-h2/src/main/resources/data.sql diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java rename to persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/SpringBootH2IntegrationTest.java diff --git a/persistence-modules/spring-boot-h2/spring-boot-h2-database/src/test/java/com/baeldung/SpringContextIntegrationTest.java b/persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/SpringContextIntegrationTest.java similarity index 100% rename from persistence-modules/spring-boot-h2/spring-boot-h2-database/src/test/java/com/baeldung/SpringContextIntegrationTest.java rename to persistence-modules/spring-boot-persistence-h2/src/test/java/com/baeldung/SpringContextIntegrationTest.java