diff --git a/persistence-modules/spring-data-jpa-repo/pom.xml b/persistence-modules/spring-data-jpa-repo/pom.xml
index 4ce19d83d0..1eed56266a 100644
--- a/persistence-modules/spring-data-jpa-repo/pom.xml
+++ b/persistence-modules/spring-data-jpa-repo/pom.xml
@@ -8,9 +8,9 @@
com.baeldung
- parent-boot-2
+ parent-boot-3
0.0.1-SNAPSHOT
- ../../parent-boot-2
+ ../../parent-boot-3
@@ -47,6 +47,31 @@
guava
${guava.version}
+
+ jakarta.xml.bind
+ jakarta.xml.bind-api
+ 4.0.0
+
+
+
+
+ org.springframework.boot
+ spring-boot-maven-plugin
+
+
+ repackage
+
+ repackage
+
+
+ true
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemRepositoryImpl.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemRepositoryImpl.java
index 820a2cdd41..132095213d 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemRepositoryImpl.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemRepositoryImpl.java
@@ -1,12 +1,12 @@
package com.baeldung.boot.daos.impl;
-import javax.persistence.EntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import com.baeldung.boot.daos.CustomItemRepository;
import com.baeldung.boot.domain.Item;
+import jakarta.persistence.EntityManager;
@Repository
public class CustomItemRepositoryImpl implements CustomItemRepository {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemTypeRepositoryImpl.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemTypeRepositoryImpl.java
index e057f36b26..d533503b57 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemTypeRepositoryImpl.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/CustomItemTypeRepositoryImpl.java
@@ -1,6 +1,5 @@
package com.baeldung.boot.daos.impl;
-import javax.persistence.EntityManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@@ -8,6 +7,8 @@ import org.springframework.stereotype.Repository;
import com.baeldung.boot.daos.CustomItemTypeRepository;
import com.baeldung.boot.domain.ItemType;
+import jakarta.persistence.EntityManager;
+
@Repository
public class CustomItemTypeRepositoryImpl implements CustomItemTypeRepository {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/ExtendedRepositoryImpl.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/ExtendedRepositoryImpl.java
index fbe6695844..14d59b9d7e 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/ExtendedRepositoryImpl.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/daos/impl/ExtendedRepositoryImpl.java
@@ -3,18 +3,19 @@ package com.baeldung.boot.daos.impl;
import java.io.Serializable;
import java.util.List;
-import javax.persistence.EntityManager;
-import javax.persistence.TypedQuery;
-import javax.persistence.criteria.CriteriaBuilder;
-import javax.persistence.criteria.CriteriaQuery;
-import javax.persistence.criteria.Root;
-import javax.transaction.Transactional;
import org.springframework.data.jpa.repository.support.JpaEntityInformation;
import org.springframework.data.jpa.repository.support.SimpleJpaRepository;
import com.baeldung.boot.daos.ExtendedRepository;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.TypedQuery;
+import jakarta.persistence.criteria.CriteriaBuilder;
+import jakarta.persistence.criteria.CriteriaQuery;
+import jakarta.persistence.criteria.Root;
+import jakarta.transaction.Transactional;
+
public class ExtendedRepositoryImpl extends SimpleJpaRepository implements ExtendedRepository {
private EntityManager entityManager;
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Item.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Item.java
index 8ac06af15a..1a9c418064 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Item.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Item.java
@@ -2,9 +2,9 @@ package com.baeldung.boot.domain;
import java.math.BigDecimal;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.ManyToOne;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.ManyToOne;
@Entity
public class Item {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/ItemType.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/ItemType.java
index 8a52a9847c..41f248c149 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/ItemType.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/ItemType.java
@@ -3,11 +3,11 @@ package com.baeldung.boot.domain;
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToMany;
@Entity
public class ItemType {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/KVTag.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/KVTag.java
index 1901f43c0a..fd19370c3b 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/KVTag.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/KVTag.java
@@ -1,6 +1,6 @@
package com.baeldung.boot.domain;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Embeddable;
@Embeddable
public class KVTag {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Location.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Location.java
index 9c1b93d551..34d5ea7315 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Location.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Location.java
@@ -3,11 +3,11 @@ package com.baeldung.boot.domain;
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.OneToMany;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.OneToMany;
@Entity
public class Location {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/MerchandiseEntity.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/MerchandiseEntity.java
index e94c23de86..613aeb21ef 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/MerchandiseEntity.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/MerchandiseEntity.java
@@ -1,11 +1,12 @@
package com.baeldung.boot.domain;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
import java.math.BigDecimal;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
+
@Entity
public class MerchandiseEntity {
@Id
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/SkillTag.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/SkillTag.java
index 0933a3e6af..c46017bce7 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/SkillTag.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/SkillTag.java
@@ -1,6 +1,6 @@
package com.baeldung.boot.domain;
-import javax.persistence.Embeddable;
+import jakarta.persistence.Embeddable;
@Embeddable
public class SkillTag {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Store.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Store.java
index 5b4b831cc7..ea01094c98 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Store.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Store.java
@@ -3,12 +3,12 @@ package com.baeldung.boot.domain;
import java.util.ArrayList;
import java.util.List;
-import javax.persistence.CascadeType;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.OneToMany;
+import jakarta.persistence.CascadeType;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.persistence.JoinColumn;
+import jakarta.persistence.ManyToOne;
+import jakarta.persistence.OneToMany;
@Entity
public class Store {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Student.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Student.java
index 1003167cc7..01c26fa987 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Student.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/boot/domain/Student.java
@@ -1,11 +1,12 @@
package com.baeldung.boot.domain;
-import javax.persistence.ElementCollection;
-import javax.persistence.Entity;
-import javax.persistence.Id;
import java.util.ArrayList;
import java.util.List;
+import jakarta.persistence.ElementCollection;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+
@Entity
public class Student {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/derivedquery/entity/User.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/derivedquery/entity/User.java
index 49e824f09f..b5b5eb40b0 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/derivedquery/entity/User.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/derivedquery/entity/User.java
@@ -1,11 +1,12 @@
package com.baeldung.derivedquery.entity;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
-import javax.persistence.Table;
import java.time.ZonedDateTime;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+import jakarta.persistence.Table;
+
@Table(name = "users")
@Entity
public class User {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Foo.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Foo.java
index f799635eae..f725be4adf 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Foo.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Foo.java
@@ -2,11 +2,11 @@ package com.baeldung.jpa.domain;
import java.io.Serializable;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
@Entity
public class Foo implements Serializable {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Fruit.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Fruit.java
index 6314c58da3..84c9daf4c4 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Fruit.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Fruit.java
@@ -1,8 +1,8 @@
package com.baeldung.jpa.domain;
-import javax.persistence.Entity;
-import javax.persistence.Id;
-import javax.xml.bind.annotation.XmlRootElement;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+import jakarta.xml.bind.annotation.XmlRootElement;
@XmlRootElement
@Entity
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Passenger.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Passenger.java
index acfb7947c0..3a98d97426 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Passenger.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Passenger.java
@@ -1,12 +1,13 @@
package com.baeldung.jpa.domain;
-import javax.persistence.Basic;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.Id;
import java.util.Objects;
+import jakarta.persistence.Basic;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.Id;
+
@Entity
public class Passenger {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Song.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Song.java
index 9dcde0bea4..caeef47f8f 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Song.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/jpa/domain/Song.java
@@ -1,14 +1,16 @@
package com.baeldung.jpa.domain;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.Id;
import java.time.LocalDateTime;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.Id;
+
@Entity
public class Song {
- @Id private long id;
+ @Id
+ private long id;
private String name;
@Column(name = "length_in_seconds")
private int lengthInSeconds;
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/spring/data/persistence/like/model/Movie.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/spring/data/persistence/like/model/Movie.java
index f500b61a8a..292219b7b1 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/spring/data/persistence/like/model/Movie.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/spring/data/persistence/like/model/Movie.java
@@ -1,9 +1,9 @@
package com.baeldung.spring.data.persistence.like.model;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
@Entity
public class Movie {
diff --git a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/storedprocedure/entity/Car.java b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/storedprocedure/entity/Car.java
index 2817c25ff7..0a61a16e24 100644
--- a/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/storedprocedure/entity/Car.java
+++ b/persistence-modules/spring-data-jpa-repo/src/main/java/com/baeldung/storedprocedure/entity/Car.java
@@ -1,13 +1,13 @@
package com.baeldung.storedprocedure.entity;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.NamedStoredProcedureQuery;
-import javax.persistence.StoredProcedureParameter;
-import javax.persistence.ParameterMode;
+import jakarta.persistence.Column;
+import jakarta.persistence.Entity;
+import jakarta.persistence.GeneratedValue;
+import jakarta.persistence.GenerationType;
+import jakarta.persistence.Id;
+import jakarta.persistence.NamedStoredProcedureQuery;
+import jakarta.persistence.ParameterMode;
+import jakarta.persistence.StoredProcedureParameter;
@Entity
@NamedStoredProcedureQuery(name = "Car.getTotalCardsbyModelEntity", procedureName = "GET_TOTAL_CARS_BY_MODEL", parameters = {
diff --git a/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/boot/daos/ExtendedStudentRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/boot/daos/ExtendedStudentRepositoryIntegrationTest.java
index 51874e2bbe..f05f4fc86c 100644
--- a/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/boot/daos/ExtendedStudentRepositoryIntegrationTest.java
+++ b/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/boot/daos/ExtendedStudentRepositoryIntegrationTest.java
@@ -4,7 +4,6 @@ import static org.assertj.core.api.Assertions.assertThat;
import java.util.List;
-import javax.annotation.Resource;
import org.junit.Before;
import org.junit.Test;
@@ -16,6 +15,8 @@ import org.springframework.test.context.junit4.SpringRunner;
import com.baeldung.boot.BootApplication;
import com.baeldung.boot.domain.Student;
+import jakarta.annotation.Resource;
+
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = { BootApplication.class})
@DirtiesContext
diff --git a/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/jpa/PassengerRepositoryIntegrationTest.java b/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/jpa/PassengerRepositoryIntegrationTest.java
index 1676cd6406..e7689c3f14 100644
--- a/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/jpa/PassengerRepositoryIntegrationTest.java
+++ b/persistence-modules/spring-data-jpa-repo/src/test/java/com/baeldung/jpa/PassengerRepositoryIntegrationTest.java
@@ -6,10 +6,6 @@ import static org.hamcrest.core.IsNot.not;
import java.util.List;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-import javax.transaction.Transactional;
-
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@@ -21,6 +17,10 @@ import org.springframework.test.context.junit4.SpringRunner;
import com.baeldung.jpa.domain.Passenger;
import com.baeldung.jpa.repository.PassengerRepository;
+import jakarta.persistence.EntityManager;
+import jakarta.persistence.PersistenceContext;
+import jakarta.transaction.Transactional;
+
@RunWith(SpringRunner.class)
@ContextConfiguration(classes = { JpaApplication.class})
@DirtiesContext