From 718c7381f4e5aeda4e3e077461a21fce63ad9167 Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Tue, 9 Apr 2024 13:53:12 +0300 Subject: [PATCH] Fix outdated (and maybe wrong) jpa related properties (#1702) Signed-off-by: Marinov Avgustin --- .../repository/jpa/RepositoryApplicationConfiguration.java | 4 +--- .../src/main/resources/hawkbit-jpa-defaults.properties | 6 ++---- .../src/main/resources/hawkbit-test-defaults.properties | 1 - 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java index a9cc59792..d9800141b 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/RepositoryApplicationConfiguration.java @@ -482,7 +482,6 @@ public class RepositoryApplicationConfiguration extends JpaBaseConfiguration { @Override protected Map getVendorProperties() { - final Map properties = new HashMap<>(7); // Turn off dynamic weaving to disable LTW lookup in static weaving mode properties.put(PersistenceUnitProperties.WEAVING, "false"); @@ -490,7 +489,7 @@ public class RepositoryApplicationConfiguration extends JpaBaseConfiguration { properties.put(PersistenceUnitProperties.ALLOW_NATIVE_SQL_QUERIES, "true"); // flyway properties.put(PersistenceUnitProperties.DDL_GENERATION, "none"); - // Embeed into hawkBit logging + // Embed into hawkBit logging properties.put(PersistenceUnitProperties.LOGGING_LOGGER, "JavaLogger"); // Ensure that we flush only at the end of the transaction properties.put(PersistenceUnitProperties.PERSISTENCE_CONTEXT_FLUSH_MODE, "COMMIT"); @@ -498,7 +497,6 @@ public class RepositoryApplicationConfiguration extends JpaBaseConfiguration { properties.put(PersistenceUnitProperties.BATCH_WRITING, "JDBC"); // Batch size properties.put(PersistenceUnitProperties.BATCH_WRITING_SIZE, "500"); - return properties; } diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/resources/hawkbit-jpa-defaults.properties b/hawkbit-repository/hawkbit-repository-jpa/src/main/resources/hawkbit-jpa-defaults.properties index a5d3e5f26..7e158e4e0 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/main/resources/hawkbit-jpa-defaults.properties +++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/resources/hawkbit-jpa-defaults.properties @@ -17,14 +17,12 @@ spring.jpa.show-sql=false # (see details: https://github.com/eclipse-ee4j/eclipselink/issues/1393) spring.datasource.url=jdbc:h2:mem:testdb;MODE=LEGACY; # Logging -spring.datasource.eclipselink.logging.logger=JavaLogger spring.jpa.properties.eclipselink.logging.level=off # Cluster aware -spring.datasource.eclipselink.query-results-cache=false -spring.datasource.eclipselink.cache.shared.default=false +spring.jpa.properties.eclipselink.query-results-cache=false +spring.jpa.properties.eclipselink.cache.shared.default=false # Flyway DDL spring.flyway.enabled=true -spring.flyway.init-on-migrate=true spring.flyway.clean-disabled=true spring.flyway.sql-migration-suffixes=${spring.jpa.database}.sql spring.flyway.table=schema_version diff --git a/hawkbit-repository/hawkbit-repository-test/src/main/resources/hawkbit-test-defaults.properties b/hawkbit-repository/hawkbit-repository-test/src/main/resources/hawkbit-test-defaults.properties index e480b6974..afe55b269 100644 --- a/hawkbit-repository/hawkbit-repository-test/src/main/resources/hawkbit-test-defaults.properties +++ b/hawkbit-repository/hawkbit-repository-test/src/main/resources/hawkbit-test-defaults.properties @@ -13,7 +13,6 @@ logging.level.root=ERROR logging.level.org.eclipse.hawkbit.repository.test.matcher.EventVerifier=ERROR logging.level.org.eclipse.persistence=ERROR -spring.datasource.eclipselink.logging.logger=JavaLogger spring.jpa.properties.eclipselink.logging.level=FINE spring.jpa.properties.eclipselink.logging.level.sql=FINE spring.jpa.properties.eclipselink.logging.parameters=true