From 14cb343daba245ba78edee107843e4b818f2a7e8 Mon Sep 17 00:00:00 2001 From: sampadawagde Date: Sat, 15 Jan 2022 12:17:35 +0530 Subject: [PATCH] JAVA-8368: Split or move spring-data-jpa-crud module --- persistence-modules/pom.xml | 1 + .../spring-data-jpa-crud-2/README.md | 16 ++++++++ .../spring-data-jpa-crud-2/pom.xml | 37 +++++++++++++++++++ .../schemageneration/AccountApplication.java | 0 .../schemageneration/HibernateUtil.java | 0 .../schemageneration/model/Account.java | 0 .../model/AccountSetting.java | 0 .../repository/AccountRepository.java | 0 .../repository/AccountSettingRepository.java | 0 .../AccountRepositoryIntegrationTest.java | 0 .../spring-data-jpa-crud/README.md | 2 +- 11 files changed, 55 insertions(+), 1 deletion(-) create mode 100644 persistence-modules/spring-data-jpa-crud-2/README.md create mode 100644 persistence-modules/spring-data-jpa-crud-2/pom.xml rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/AccountApplication.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/HibernateUtil.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/model/Account.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/model/AccountSetting.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/repository/AccountRepository.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/main/java/com/baeldung/schemageneration/repository/AccountSettingRepository.java (100%) rename persistence-modules/{spring-data-jpa-crud => spring-data-jpa-crud-2}/src/test/java/com/baeldung/schemageneration/AccountRepositoryIntegrationTest.java (100%) diff --git a/persistence-modules/pom.xml b/persistence-modules/pom.xml index 85dbccce9c..152e58d57b 100644 --- a/persistence-modules/pom.xml +++ b/persistence-modules/pom.xml @@ -71,6 +71,7 @@ spring-data-geode spring-data-jpa-annotations spring-data-jpa-crud + spring-data-jpa-crud-2 spring-data-jpa-enterprise spring-data-jpa-filtering spring-data-jpa-query diff --git a/persistence-modules/spring-data-jpa-crud-2/README.md b/persistence-modules/spring-data-jpa-crud-2/README.md new file mode 100644 index 0000000000..007ef42c4e --- /dev/null +++ b/persistence-modules/spring-data-jpa-crud-2/README.md @@ -0,0 +1,16 @@ +## Spring Data JPA - CRUD + +This module contains articles about CRUD operations in Spring Data JPA + +### Relevant Articles: +- [Generate Database Schema with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-generate-db-schema) +- More articles: [[<--prev]](/spring-data-jpa-crud) + +### Eclipse Config +After importing the project into Eclipse, you may see the following error: +"No persistence xml file found in project" + +This can be ignored: +- Project -> Properties -> Java Persistance -> JPA -> Error/Warnings -> Select Ignore on "No persistence xml file found in project" +Or: +- Eclipse -> Preferences - Validation - disable the "Build" execution of the JPA Validator diff --git a/persistence-modules/spring-data-jpa-crud-2/pom.xml b/persistence-modules/spring-data-jpa-crud-2/pom.xml new file mode 100644 index 0000000000..8b3bbe54b0 --- /dev/null +++ b/persistence-modules/spring-data-jpa-crud-2/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + spring-data-jpa-crud-2 + spring-data-jpa-crud-2 + + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../../parent-boot-2 + + + + + + org.springframework.boot + spring-boot-starter-data-jpa + + + org.springframework.boot + spring-boot-starter-web + + + com.h2database + h2 + runtime + + + + + 1.4.1 + + + \ No newline at end of file diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/AccountApplication.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/AccountApplication.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/AccountApplication.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/AccountApplication.java diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/HibernateUtil.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/HibernateUtil.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/HibernateUtil.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/HibernateUtil.java diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/model/Account.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/model/Account.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/model/Account.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/model/Account.java diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/model/AccountSetting.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/model/AccountSetting.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/model/AccountSetting.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/model/AccountSetting.java diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/repository/AccountRepository.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/repository/AccountRepository.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/repository/AccountRepository.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/repository/AccountRepository.java diff --git a/persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/repository/AccountSettingRepository.java b/persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/repository/AccountSettingRepository.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/main/java/com/baeldung/schemageneration/repository/AccountSettingRepository.java rename to persistence-modules/spring-data-jpa-crud-2/src/main/java/com/baeldung/schemageneration/repository/AccountSettingRepository.java diff --git a/persistence-modules/spring-data-jpa-crud/src/test/java/com/baeldung/schemageneration/AccountRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-crud-2/src/test/java/com/baeldung/schemageneration/AccountRepositoryIntegrationTest.java similarity index 100% rename from persistence-modules/spring-data-jpa-crud/src/test/java/com/baeldung/schemageneration/AccountRepositoryIntegrationTest.java rename to persistence-modules/spring-data-jpa-crud-2/src/test/java/com/baeldung/schemageneration/AccountRepositoryIntegrationTest.java diff --git a/persistence-modules/spring-data-jpa-crud/README.md b/persistence-modules/spring-data-jpa-crud/README.md index 81559bb773..865cc51733 100644 --- a/persistence-modules/spring-data-jpa-crud/README.md +++ b/persistence-modules/spring-data-jpa-crud/README.md @@ -9,8 +9,8 @@ This module contains articles about CRUD operations in Spring Data JPA - [Spring Data JPA Batch Inserts](https://www.baeldung.com/spring-data-jpa-batch-inserts) - [Batch Insert/Update with Hibernate/JPA](https://www.baeldung.com/jpa-hibernate-batch-insert-update) - [Difference Between save() and saveAndFlush() in Spring Data JPA](https://www.baeldung.com/spring-data-jpa-save-saveandflush) -- [Generate Database Schema with Spring Data JPA](https://www.baeldung.com/spring-data-jpa-generate-db-schema) - [How to Implement a Soft Delete with Spring JPA](https://www.baeldung.com/spring-jpa-soft-delete) +- More articles: [[next-->]](/spring-data-jpa-crud-2) ### Eclipse Config After importing the project into Eclipse, you may see the following error: