mirror of
https://github.com/sismics/docs.git
synced 2025-01-03 00:33:48 +01:00
Upgrade Hibernate version (#726)
This commit is contained in:
parent
a89543b555
commit
0351f94761
@ -17,8 +17,8 @@
|
|||||||
<dependencies>
|
<dependencies>
|
||||||
<!-- Persistence layer dependencies -->
|
<!-- Persistence layer dependencies -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate.orm</groupId>
|
||||||
<artifactId>hibernate-core-jakarta</artifactId>
|
<artifactId>hibernate-core</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- Other external dependencies -->
|
<!-- Other external dependencies -->
|
||||||
|
@ -26,7 +26,7 @@ import java.util.Properties;
|
|||||||
public final class EMF {
|
public final class EMF {
|
||||||
private static final Logger log = LoggerFactory.getLogger(EMF.class);
|
private static final Logger log = LoggerFactory.getLogger(EMF.class);
|
||||||
|
|
||||||
private static Map<Object, Object> properties;
|
private static Properties properties;
|
||||||
|
|
||||||
private static EntityManagerFactory emfInstance;
|
private static EntityManagerFactory emfInstance;
|
||||||
|
|
||||||
@ -59,7 +59,7 @@ public final class EMF {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static Map<Object, Object> getEntityManagerProperties() {
|
private static Properties getEntityManagerProperties() {
|
||||||
// Use properties file if exists
|
// Use properties file if exists
|
||||||
try {
|
try {
|
||||||
URL hibernatePropertiesUrl = EMF.class.getResource("/hibernate.properties");
|
URL hibernatePropertiesUrl = EMF.class.getResource("/hibernate.properties");
|
||||||
@ -81,7 +81,7 @@ public final class EMF {
|
|||||||
String databasePassword = System.getenv("DATABASE_PASSWORD");
|
String databasePassword = System.getenv("DATABASE_PASSWORD");
|
||||||
|
|
||||||
log.info("Configuring EntityManager from environment parameters");
|
log.info("Configuring EntityManager from environment parameters");
|
||||||
Map<Object, Object> props = new HashMap<>();
|
Properties props = new Properties();
|
||||||
Path dbDirectory = DirectoryUtil.getDbDirectory();
|
Path dbDirectory = DirectoryUtil.getDbDirectory();
|
||||||
String dbFile = dbDirectory.resolve("docs").toAbsolutePath().toString();
|
String dbFile = dbDirectory.resolve("docs").toAbsolutePath().toString();
|
||||||
if (Strings.isNullOrEmpty(databaseUrl)) {
|
if (Strings.isNullOrEmpty(databaseUrl)) {
|
||||||
@ -92,7 +92,7 @@ public final class EMF {
|
|||||||
props.put("hibernate.connection.username", "sa");
|
props.put("hibernate.connection.username", "sa");
|
||||||
} else {
|
} else {
|
||||||
props.put("hibernate.connection.driver_class", "org.postgresql.Driver");
|
props.put("hibernate.connection.driver_class", "org.postgresql.Driver");
|
||||||
props.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQL94Dialect");
|
props.put("hibernate.dialect", "org.hibernate.dialect.PostgreSQLDialect");
|
||||||
props.put("hibernate.connection.url", databaseUrl);
|
props.put("hibernate.connection.url", databaseUrl);
|
||||||
props.put("hibernate.connection.username", databaseUsername);
|
props.put("hibernate.connection.username", databaseUsername);
|
||||||
props.put("hibernate.connection.password", databasePassword);
|
props.put("hibernate.connection.password", databasePassword);
|
||||||
|
6
pom.xml
6
pom.xml
@ -35,7 +35,7 @@
|
|||||||
<org.apache.pdfbox.pdfbox.version>2.0.27</org.apache.pdfbox.pdfbox.version>
|
<org.apache.pdfbox.pdfbox.version>2.0.27</org.apache.pdfbox.pdfbox.version>
|
||||||
<org.bouncycastle.bcprov-jdk15on.version>1.70</org.bouncycastle.bcprov-jdk15on.version>
|
<org.bouncycastle.bcprov-jdk15on.version>1.70</org.bouncycastle.bcprov-jdk15on.version>
|
||||||
<joda-time.joda-time.version>2.12.2</joda-time.joda-time.version>
|
<joda-time.joda-time.version>2.12.2</joda-time.joda-time.version>
|
||||||
<org.hibernate.hibernate.version>5.6.15.Final</org.hibernate.hibernate.version>
|
<org.hibernate.hibernate.version>6.3.1.Final</org.hibernate.hibernate.version>
|
||||||
<fr.opensagres.xdocreport.version>2.0.4</fr.opensagres.xdocreport.version>
|
<fr.opensagres.xdocreport.version>2.0.4</fr.opensagres.xdocreport.version>
|
||||||
<net.java.dev.jna.jna.version>5.13.0</net.java.dev.jna.jna.version>
|
<net.java.dev.jna.jna.version>5.13.0</net.java.dev.jna.jna.version>
|
||||||
<com.twelvemonkeys.imageio.version>3.9.4</com.twelvemonkeys.imageio.version>
|
<com.twelvemonkeys.imageio.version>3.9.4</com.twelvemonkeys.imageio.version>
|
||||||
@ -327,8 +327,8 @@
|
|||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.hibernate</groupId>
|
<groupId>org.hibernate.orm</groupId>
|
||||||
<artifactId>hibernate-core-jakarta</artifactId>
|
<artifactId>hibernate-core</artifactId>
|
||||||
<version>${org.hibernate.hibernate.version}</version>
|
<version>${org.hibernate.hibernate.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user