[JAVA-31266] - Hibernate upgrade for Aws-Modules and pattern modules (#15849)
This commit is contained in:
parent
9bb86532eb
commit
77ee5c98e0
|
@ -31,15 +31,21 @@
|
|||
<version>${jackson-databind.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-hikaricp</artifactId>
|
||||
<version>${hibernate.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.zaxxer</groupId>
|
||||
<artifactId>HikariCP</artifactId>
|
||||
<version>${hikari.cp.version}</version>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.postgresql</groupId>
|
||||
<artifactId>postgresql</artifactId>
|
||||
|
@ -70,11 +76,12 @@
|
|||
<properties>
|
||||
<maven.compiler.source>11</maven.compiler.source>
|
||||
<maven.compiler.target>11</maven.compiler.target>
|
||||
<hibernate.version>5.4.21.Final</hibernate.version>
|
||||
<hibernate.version>6.4.2.Final</hibernate.version>
|
||||
<aws-lambda-java-core.version>1.2.0</aws-lambda-java-core.version>
|
||||
<aws-lambda-java-events.version>3.1.0</aws-lambda-java-events.version>
|
||||
<jackson-databind.version>2.11.2</jackson-databind.version>
|
||||
<postgresql.version>42.2.16</postgresql.version>
|
||||
<hikari.cp.version>5.1.0</hikari.cp.version>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -83,7 +83,7 @@ private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
|
|||
}
|
||||
|
||||
private static SessionFactory createSessionFactory() {
|
||||
Map<String, String> settings = new HashMap<>();
|
||||
Map<String, Object> settings = new HashMap<>();
|
||||
settings.put(URL, System.getenv("DB_URL"));
|
||||
settings.put(DIALECT, "org.hibernate.dialect.PostgreSQLDialect");
|
||||
settings.put(DEFAULT_SCHEMA, "shipping");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.lambda.shipping;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Embeddable;
|
||||
|
||||
@Embeddable
|
||||
public class Checkin {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.lambda.shipping;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import static javax.persistence.FetchType.EAGER;
|
||||
import static jakarta.persistence.FetchType.EAGER;
|
||||
|
||||
@Entity(name = "consignment")
|
||||
@Table(name = "consignment")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package com.baeldung.lambda.shipping;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Embeddable;
|
||||
|
||||
@Embeddable
|
||||
public class Item {
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<version>${rest-assured.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<groupId>org.hibernate.orm</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<version>${hibernate-core.version}</version>
|
||||
</dependency>
|
||||
|
@ -64,7 +64,7 @@
|
|||
</dependencies>
|
||||
|
||||
<properties>
|
||||
<hibernate-core.version>5.2.16.Final</hibernate-core.version>
|
||||
<hibernate-core.version>6.4.2.Final</hibernate-core.version>
|
||||
<mysql-connector.version>8.2.0</mysql-connector.version>
|
||||
<spring-boot.version>2.7.5</spring-boot.version>
|
||||
<rest-assured.version>5.3.0</rest-assured.version>
|
||||
|
|
|
@ -6,8 +6,8 @@ import com.baeldung.daopattern.daos.JpaUserDao;
|
|||
import com.baeldung.daopattern.entities.User;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.Persistence;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.Persistence;
|
||||
|
||||
public class UserApplication {
|
||||
|
||||
|
|
|
@ -8,10 +8,10 @@ import java.util.List;
|
|||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import javax.sql.DataSource;
|
||||
import javax.persistence.EntityManagerFactory;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import jakarta.persistence.EntityManagerFactory;
|
||||
import jakarta.persistence.spi.PersistenceUnitInfo;
|
||||
import org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl;
|
||||
import org.hibernate.jpa.boot.internal.PersistenceUnitInfoDescriptor;
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@ import java.util.Collections;
|
|||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import javax.sql.DataSource;
|
||||
import javax.persistence.SharedCacheMode;
|
||||
import javax.persistence.ValidationMode;
|
||||
import javax.persistence.spi.ClassTransformer;
|
||||
import javax.persistence.spi.PersistenceUnitInfo;
|
||||
import javax.persistence.spi.PersistenceUnitTransactionType;
|
||||
import jakarta.persistence.SharedCacheMode;
|
||||
import jakarta.persistence.ValidationMode;
|
||||
import jakarta.persistence.spi.ClassTransformer;
|
||||
import jakarta.persistence.spi.PersistenceUnitInfo;
|
||||
import jakarta.persistence.spi.PersistenceUnitTransactionType;
|
||||
import org.hibernate.jpa.HibernatePersistenceProvider;
|
||||
|
||||
public class PersistenceUnitInfoImpl implements PersistenceUnitInfo {
|
||||
|
|
|
@ -5,9 +5,9 @@ import java.util.List;
|
|||
import java.util.Objects;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Consumer;
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.EntityTransaction;
|
||||
import javax.persistence.Query;
|
||||
import jakarta.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityTransaction;
|
||||
import jakarta.persistence.Query;
|
||||
|
||||
public class JpaUserDao implements Dao<User> {
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.daopattern.entities;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.persistence.Table;
|
||||
|
||||
@Entity
|
||||
@Table(name = "users")
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.repositoryvsdaopattern;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import jakarta.persistence.EntityManager;
|
||||
|
||||
public class UserDaoImpl implements UserDao {
|
||||
|
||||
|
|
Loading…
Reference in New Issue