diff --git a/persistence-modules/spring-persistence-simple/pom.xml b/persistence-modules/spring-persistence-simple/pom.xml
index aa9f9d5029..1afacab164 100644
--- a/persistence-modules/spring-persistence-simple/pom.xml
+++ b/persistence-modules/spring-persistence-simple/pom.xml
@@ -18,12 +18,6 @@
org.springframework
spring-orm
${org.springframework.version}
-
-
- commons-logging
- commons-logging
-
-
org.springframework
@@ -108,12 +102,6 @@
querydsl-apt
${querydsl.version}
-
- org.hsqldb
- hsqldb
- ${hsqldb.version}
- test
-
@@ -156,7 +144,6 @@
9.0.0.M26
1.1
4.2.1
- 2.4.1
21.0
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceConfig.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceConfig.java
similarity index 93%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceConfig.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceConfig.java
index c454ab3b54..569971e311 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceConfig.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceConfig.java
@@ -1,11 +1,10 @@
-package org.baeldung.config;
+package com.baeldung.config;
import java.util.Properties;
import javax.sql.DataSource;
import org.apache.tomcat.dbcp.dbcp2.BasicDataSource;
-import org.baeldung.persistence.dao.IFooDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
@@ -24,15 +23,16 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.PlatformTransactionManager;
import org.springframework.transaction.annotation.EnableTransactionManagement;
-import com.baeldung.persistence.dao.impl.FooDao;
+import com.baeldung.hibernate.dao.FooDao;
+import com.baeldung.jpa.dao.IFooDao;
import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
-@EnableJpaRepositories(basePackages = { "com.baeldung.persistence" }, transactionManagerRef = "jpaTransactionManager")
+@EnableJpaRepositories(basePackages = { "com.baeldung.hibernate.dao" }, transactionManagerRef = "jpaTransactionManager")
@EnableJpaAuditing
@PropertySource({ "classpath:persistence-mysql.properties" })
-@ComponentScan({ "com.baeldung.persistence" })
+@ComponentScan({ "com.baeldung.persistence", "com.baeldung.hibernate.dao" })
public class PersistenceConfig {
@Autowired
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceJPAConfig.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
similarity index 93%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceJPAConfig.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
index ec0d4bca3c..9fae34d99e 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/config/PersistenceJPAConfig.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/config/PersistenceJPAConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.config;
+package com.baeldung.config;
import java.util.Properties;
@@ -25,8 +25,8 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-h2.properties" })
-@ComponentScan({ "org.baeldung.persistence" })
-@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao")
+@ComponentScan({ "com.baeldung.persistence","com.baeldung.jpa.dao" })
+@EnableJpaRepositories(basePackages = "com.baeldung.jpa.dao")
public class PersistenceJPAConfig {
@Autowired
@@ -42,7 +42,7 @@ public class PersistenceJPAConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
- em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
+ em.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
em.setJpaVendorAdapter(vendorAdapter);
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/hibernate/dao/FooDao.java
similarity index 69%
rename from persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/hibernate/dao/FooDao.java
index 2d940527e1..67c10fe7fe 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/impl/FooDao.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/hibernate/dao/FooDao.java
@@ -1,9 +1,9 @@
-package com.baeldung.persistence.dao.impl;
+package com.baeldung.hibernate.dao;
-import org.baeldung.persistence.dao.IFooDao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
+import com.baeldung.jpa.dao.IFooDao;
import com.baeldung.persistence.dao.common.AbstractHibernateDao;
@Repository
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/CustomSQLErrorCodeTranslator.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/CustomSQLErrorCodeTranslator.java
similarity index 88%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/CustomSQLErrorCodeTranslator.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/CustomSQLErrorCodeTranslator.java
index 8a02fe6a53..48ddfb04b1 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/CustomSQLErrorCodeTranslator.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/CustomSQLErrorCodeTranslator.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbc;
+package com.baeldung.jdbc;
import java.sql.SQLException;
@@ -10,7 +10,7 @@ public class CustomSQLErrorCodeTranslator extends SQLErrorCodeSQLExceptionTransl
@Override
protected DataAccessException customTranslate(final String task, final String sql, final SQLException sqlException) {
- if (sqlException.getErrorCode() == -104) {
+ if (sqlException.getErrorCode() == 23505) {
return new DuplicateKeyException("Custome Exception translator - Integrity contraint voilation.", sqlException);
}
return null;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/Employee.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/Employee.java
similarity index 96%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/Employee.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/Employee.java
index e9408eb7fa..a43eb265c7 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/Employee.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/Employee.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbc;
+package com.baeldung.jdbc;
public class Employee {
private int id;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeDAO.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeDAO.java
similarity index 99%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeDAO.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeDAO.java
index 1f0e7b28ad..9ba4ebdb6d 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeDAO.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeDAO.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbc;
+package com.baeldung.jdbc;
import java.sql.PreparedStatement;
import java.sql.SQLException;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeRowMapper.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeRowMapper.java
similarity index 95%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeRowMapper.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeRowMapper.java
index f926836c40..d09cd45dbc 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/EmployeeRowMapper.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/EmployeeRowMapper.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbc;
+package com.baeldung.jdbc;
import java.sql.ResultSet;
import java.sql.SQLException;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/config/SpringJdbcConfig.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/config/SpringJdbcConfig.java
similarity index 84%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/config/SpringJdbcConfig.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/config/SpringJdbcConfig.java
index f7eb592366..ddc24e439f 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/jdbc/config/SpringJdbcConfig.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jdbc/config/SpringJdbcConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.jdbc.config;
+package com.baeldung.jdbc.config;
import javax.sql.DataSource;
@@ -10,12 +10,12 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
@Configuration
-@ComponentScan("org.baeldung.jdbc")
+@ComponentScan("com.baeldung.jdbc")
public class SpringJdbcConfig {
@Bean
public DataSource dataSource() {
- return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.HSQL).addScript("classpath:jdbc/schema.sql").addScript("classpath:jdbc/test-data.sql").build();
+ return new EmbeddedDatabaseBuilder().setType(EmbeddedDatabaseType.H2).addScript("classpath:jdbc/schema.sql").addScript("classpath:jdbc/test-data.sql").build();
}
// @Bean
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/AbstractJpaDAO.java
similarity index 96%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/AbstractJpaDAO.java
index decca35c08..4fbc8464bb 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/AbstractJpaDAO.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/AbstractJpaDAO.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.jpa.dao;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/FooDao.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/FooDao.java
similarity index 73%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/FooDao.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/FooDao.java
index 77978c5cf2..e79a44a0c2 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/FooDao.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/FooDao.java
@@ -1,6 +1,6 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.jpa.dao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
import org.springframework.stereotype.Repository;
@Repository
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/IFooDao.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/IFooDao.java
similarity index 74%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/IFooDao.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/IFooDao.java
index ba188b9b3a..8140c56edd 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/dao/IFooDao.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/jpa/dao/IFooDao.java
@@ -1,8 +1,8 @@
-package org.baeldung.persistence.dao;
+package com.baeldung.jpa.dao;
import java.util.List;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.persistence.model.Foo;
public interface IFooDao {
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/common/GenericJpaDao.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/common/GenericJpaDao.java
index 5bcebed761..d4da194f4d 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/common/GenericJpaDao.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/dao/common/GenericJpaDao.java
@@ -2,11 +2,12 @@ package com.baeldung.persistence.dao.common;
import java.io.Serializable;
-import org.baeldung.persistence.dao.AbstractJpaDAO;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Repository;
+import com.baeldung.jpa.dao.AbstractJpaDAO;
+
@Repository
@Scope(BeanDefinition.SCOPE_PROTOTYPE)
public class GenericJpaDao extends AbstractJpaDAO implements IGenericDao {
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Bar.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Bar.java
similarity index 98%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Bar.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Bar.java
index b602e57562..5a88ecc6cf 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Bar.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Bar.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Foo.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Foo.java
similarity index 98%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Foo.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Foo.java
index 30635e9ef2..009876f8cb 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/model/Foo.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/model/Foo.java
@@ -1,4 +1,4 @@
-package org.baeldung.persistence.model;
+package com.baeldung.persistence.model;
import java.io.Serializable;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/service/FooService.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/service/FooService.java
similarity index 81%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/service/FooService.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/service/FooService.java
index 6d1bb0adbe..efe9743670 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/persistence/service/FooService.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/persistence/service/FooService.java
@@ -1,9 +1,9 @@
-package org.baeldung.persistence.service;
+package com.baeldung.persistence.service;
import java.util.List;
-import org.baeldung.persistence.dao.IFooDao;
-import org.baeldung.persistence.model.Foo;
+import com.baeldung.jpa.dao.IFooDao;
+import com.baeldung.persistence.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/config/PersistenceConfig.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java
similarity index 93%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/config/PersistenceConfig.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java
index 067bac2018..717b9c3aa0 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/config/PersistenceConfig.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/config/PersistenceConfig.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.config;
+package com.baeldung.spring.data.persistence.config;
import java.util.Properties;
@@ -24,9 +24,9 @@ import com.google.common.base.Preconditions;
@Configuration
@EnableTransactionManagement
@PropertySource({ "classpath:persistence-${envTarget:h2}.properties" })
-@ComponentScan({ "org.baeldung.spring.data.persistence" })
+@ComponentScan({ "com.baeldung.spring.data.persistence" })
// @ImportResource("classpath*:springDataPersistenceConfig.xml")
-@EnableJpaRepositories(basePackages = "org.baeldung.spring.data.persistence.dao")
+@EnableJpaRepositories(basePackages = "com.baeldung.spring.data.persistence.dao")
public class PersistenceConfig {
@Autowired
@@ -40,7 +40,7 @@ public class PersistenceConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource());
- em.setPackagesToScan(new String[] { "org.baeldung.spring.data.persistence.model" });
+ em.setPackagesToScan(new String[] { "com.baeldung.spring.data.persistence.model" });
final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
// vendorAdapter.set
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/IFooDao.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/IFooDao.java
similarity index 77%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/IFooDao.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/IFooDao.java
index 2f74096e14..d2b746dc8b 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/IFooDao.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/IFooDao.java
@@ -1,6 +1,6 @@
-package org.baeldung.spring.data.persistence.dao;
+package com.baeldung.spring.data.persistence.dao;
-import org.baeldung.spring.data.persistence.model.Foo;
+import com.baeldung.spring.data.persistence.model.Foo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepository.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepository.java
similarity index 97%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepository.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepository.java
index 4d01376af7..e8f95302ef 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepository.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepository.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.persistence.dao.user;
+package com.baeldung.spring.data.persistence.dao.user;
import java.time.LocalDate;
import java.util.Collection;
import java.util.List;
import java.util.stream.Stream;
-import org.baeldung.spring.data.persistence.model.User;
+import com.baeldung.spring.data.persistence.model.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java
similarity index 72%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java
index 1a874fb5e5..ff92159077 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustom.java
@@ -1,11 +1,11 @@
-package org.baeldung.spring.data.persistence.dao.user;
+package com.baeldung.spring.data.persistence.dao.user;
import java.util.Collection;
import java.util.List;
import java.util.Set;
import java.util.function.Predicate;
-import org.baeldung.spring.data.persistence.model.User;
+import com.baeldung.spring.data.persistence.model.User;
public interface UserRepositoryCustom {
List findUserByEmails(Set emails);
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java
similarity index 94%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java
index c28050401c..8bd8217e83 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/dao/user/UserRepositoryCustomImpl.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.dao.user;
+package com.baeldung.spring.data.persistence.dao.user;
import java.util.ArrayList;
import java.util.Collection;
@@ -15,7 +15,7 @@ import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
-import org.baeldung.spring.data.persistence.model.User;
+import com.baeldung.spring.data.persistence.model.User;
public class UserRepositoryCustomImpl implements UserRepositoryCustom {
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Foo.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Foo.java
similarity index 96%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Foo.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Foo.java
index 8f316ac55b..64bfe203d0 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Foo.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Foo.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.model;
+package com.baeldung.spring.data.persistence.model;
import java.io.Serializable;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Possession.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Possession.java
similarity index 97%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Possession.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Possession.java
index da64e78552..44ca9fc62e 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/Possession.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/Possession.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.model;
+package com.baeldung.spring.data.persistence.model;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/User.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/User.java
similarity index 98%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/User.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/User.java
index 486ed046e5..09f1092644 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/model/User.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/model/User.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.model;
+package com.baeldung.spring.data.persistence.model;
import javax.persistence.*;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/IFooService.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/IFooService.java
similarity index 58%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/IFooService.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/IFooService.java
index 26d0171551..00e7ac01e4 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/IFooService.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/IFooService.java
@@ -1,6 +1,6 @@
-package org.baeldung.spring.data.persistence.service;
+package com.baeldung.spring.data.persistence.service;
-import org.baeldung.spring.data.persistence.model.Foo;
+import com.baeldung.spring.data.persistence.model.Foo;
import com.baeldung.persistence.dao.common.IOperations;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/common/AbstractService.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/common/AbstractService.java
similarity index 95%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/common/AbstractService.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/common/AbstractService.java
index cf28d5e5c6..61c7d6fcaa 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/common/AbstractService.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/common/AbstractService.java
@@ -1,4 +1,4 @@
-package org.baeldung.spring.data.persistence.service.common;
+package com.baeldung.spring.data.persistence.service.common;
import java.io.Serializable;
import java.util.List;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/impl/FooService.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/impl/FooService.java
similarity index 70%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/impl/FooService.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/impl/FooService.java
index b7ed496df1..cd566ba9f6 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/spring/data/persistence/service/impl/FooService.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/spring/data/persistence/service/impl/FooService.java
@@ -1,10 +1,10 @@
-package org.baeldung.spring.data.persistence.service.impl;
+package com.baeldung.spring.data.persistence.service.impl;
-import org.baeldung.spring.data.persistence.model.Foo;
-import org.baeldung.spring.data.persistence.dao.IFooDao;
-import org.baeldung.spring.data.persistence.service.IFooService;
-import org.baeldung.spring.data.persistence.service.common.AbstractService;
+import com.baeldung.spring.data.persistence.model.Foo;
+import com.baeldung.spring.data.persistence.dao.IFooDao;
+import com.baeldung.spring.data.persistence.service.IFooService;
+import com.baeldung.spring.data.persistence.service.common.AbstractService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Service;
diff --git a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/util/IDUtil.java b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/util/IDUtil.java
similarity index 96%
rename from persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/util/IDUtil.java
rename to persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/util/IDUtil.java
index 85ab623e5f..45e72e046d 100644
--- a/persistence-modules/spring-persistence-simple/src/main/java/org/baeldung/util/IDUtil.java
+++ b/persistence-modules/spring-persistence-simple/src/main/java/com/baeldung/util/IDUtil.java
@@ -1,4 +1,4 @@
-package org.baeldung.util;
+package com.baeldung.util;
import java.util.Random;
diff --git a/persistence-modules/spring-persistence-simple/src/main/resources/jdbc/springJdbc-config.xml b/persistence-modules/spring-persistence-simple/src/main/resources/jdbc/springJdbc-config.xml
index 5fd2699b41..e3d7452eb1 100644
--- a/persistence-modules/spring-persistence-simple/src/main/resources/jdbc/springJdbc-config.xml
+++ b/persistence-modules/spring-persistence-simple/src/main/resources/jdbc/springJdbc-config.xml
@@ -4,7 +4,7 @@
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd"
>
-
+
diff --git a/persistence-modules/spring-persistence-simple/src/main/resources/persistence.xml b/persistence-modules/spring-persistence-simple/src/main/resources/persistence.xml
index 6304fa0a65..57687c306d 100644
--- a/persistence-modules/spring-persistence-simple/src/main/resources/persistence.xml
+++ b/persistence-modules/spring-persistence-simple/src/main/resources/persistence.xml
@@ -11,7 +11,7 @@
-
+