From e498af91bdcb747a48b4cdc077f94c6ed4ac9c05 Mon Sep 17 00:00:00 2001 From: GordeaS Date: Fri, 19 Apr 2024 15:32:05 +0200 Subject: [PATCH] update to mongo6, morphia version and mongo driver #EA-3647 --- entity-management-definitions/pom.xml | 135 +++++++++--------- entity-management-mongo/pom.xml | 105 ++++++++------ .../mongo/repository/AbstractRepository.java | 4 +- .../repository/ConceptSchemeRepository.java | 4 +- .../repository/EntityRecordRepository.java | 16 +-- .../repository/VocabularyRepository.java | 6 +- .../service/ScheduledTaskServiceIT.java | 4 +- .../resources/application.properties | 7 + entity-management-web/pom.xml | 8 ++ .../batch/config/EntityUpdateJobConfig.java | 2 +- .../reader/EntityRecordDatabaseReader.java | 2 +- .../reader/ScheduledTaskDatabaseReader.java | 2 +- .../repository/FailedTaskRepository.java | 13 +- .../repository/ScheduledTaskRepository.java | 27 ++-- .../batch/service/ScheduledTaskService.java | 4 +- .../mongo/repository/ZohoSyncRepository.java | 2 +- .../web/service/EntityRecordService.java | 2 +- .../web/service/RequestPathMethodService.java | 7 +- .../web/service/ZohoSyncService.java | 4 +- pom.xml | 83 ++++++++--- 20 files changed, 263 insertions(+), 174 deletions(-) diff --git a/entity-management-definitions/pom.xml b/entity-management-definitions/pom.xml index b180b8192..5cdbd3fd8 100644 --- a/entity-management-definitions/pom.xml +++ b/entity-management-definitions/pom.xml @@ -1,76 +1,83 @@ - - - entity-management - eu.europeana.api - 1.6.4-SNAPSHOT - - 4.0.0 - entity-management-definitions - jar + + + entity-management + eu.europeana.api + 1.6.4-SNAPSHOT + + 4.0.0 + entity-management-definitions + jar - - ${project.basedir}/../${aggregate.report.xml} + + + ${project.basedir}/../${aggregate.report.xml} - + - - - com.fasterxml.jackson.dataformat - jackson-dataformat-xml - + + + com.fasterxml.jackson.dataformat + jackson-dataformat-xml + - - eu.europeana.api.commons - commons-definitions - ${api.commons.version} - - - org.mongodb - mongo-java-driver - - - + + eu.europeana.api.commons + commons-definitions + ${api.commons.version} + + + org.mongodb + mongo-java-driver + + + - - dev.morphia.morphia - morphia-core - ${morphia.version} - + + dev.morphia.morphia + morphia-core + - - javax.validation - validation-api - + + javax.validation + validation-api + - - javax.annotation - javax.annotation-api - + + jakarta.xml.bind + jakarta.xml.bind-api + - - - commons-validator - commons-validator - ${apache.commons.validator.version} - + + javax.annotation + javax.annotation-api + - - eu.europeana.corelib - corelib-schemaorg - ${corelib.version} - - - org.mockito - mockito-all - - - - - org.junit.jupiter - junit-jupiter - test - - + + + commons-validator + commons-validator + ${apache.commons.validator.version} + + + + eu.europeana.corelib + corelib-schemaorg + ${corelib.version} + + + org.mockito + mockito-all + + + + + org.junit.jupiter + junit-jupiter + test + + diff --git a/entity-management-mongo/pom.xml b/entity-management-mongo/pom.xml index e17063b87..4da0accb4 100644 --- a/entity-management-mongo/pom.xml +++ b/entity-management-mongo/pom.xml @@ -1,52 +1,73 @@ - - 4.0.0 - - entity-management - eu.europeana.api + + 4.0.0 + + entity-management + eu.europeana.api 1.6.4-SNAPSHOT - + + + entity-management-mongo - entity-management-mongo - - entity-management-mongo + entity-management-mongo - ${project.basedir}/../${aggregate.report.xml} + + ${project.basedir}/../${aggregate.report.xml} - - - - eu.europeana.api - entity-management-definitions - 1.6.4-SNAPSHOT - - - - eu.europeana.api - entity-management-common - 1.6.4-SNAPSHOT - - - - eu.europeana.api.commons - ${api.commons.version} - commons-nosql - compile - - - org.mongodb.morphia - morphia - - - - - - - org.springframework - spring-context - + + + + eu.europeana.api + entity-management-definitions + 1.6.4-SNAPSHOT + + + + eu.europeana.api + entity-management-common + 1.6.4-SNAPSHOT + + + + eu.europeana.api.commons + ${api.commons.version} + commons-nosql + compile + + + org.mongodb.morphia + morphia + + + + dev.morphia.morphia + core + + + org.mongodb + mongodb-driver-legacy + + + org.mongodb + mongodb-driver-sync + + + + + + + dev.morphia.morphia + morphia-core + + + + org.springframework + spring-context + eu.europeana.api spring-batch-mongo diff --git a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/AbstractRepository.java b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/AbstractRepository.java index de93b0546..eb93800d7 100644 --- a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/AbstractRepository.java +++ b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/AbstractRepository.java @@ -1,10 +1,10 @@ package eu.europeana.entitymanagement.mongo.repository; -import static dev.morphia.query.experimental.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.eq; import static eu.europeana.entitymanagement.mongo.utils.MorphiaUtils.MAJORITY_WRITE_MODIFY_OPTS; import dev.morphia.Datastore; -import dev.morphia.query.experimental.updates.UpdateOperators; +import dev.morphia.query.updates.UpdateOperators; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.model.EntityIdGenerator; import javax.annotation.Resource; diff --git a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/ConceptSchemeRepository.java b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/ConceptSchemeRepository.java index 1d5f3c4c4..5dc811f65 100644 --- a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/ConceptSchemeRepository.java +++ b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/ConceptSchemeRepository.java @@ -1,6 +1,6 @@ package eu.europeana.entitymanagement.mongo.repository; -import static dev.morphia.query.experimental.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.eq; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.ConceptSchemeFields; @@ -32,7 +32,7 @@ public long deleteForGood(long identifier) { /** Drops the ConceptScheme collection. */ public void dropCollection() { - getDataStore().getMapper().getCollection(ConceptScheme.class).drop(); + getDataStore().getCollection(ConceptScheme.class).drop(); } public ConceptScheme findConceptScheme(long identifier) { diff --git a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/EntityRecordRepository.java b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/EntityRecordRepository.java index 321334540..b9f7820b6 100644 --- a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/EntityRecordRepository.java +++ b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/EntityRecordRepository.java @@ -1,10 +1,10 @@ package eu.europeana.entitymanagement.mongo.repository; import static dev.morphia.query.Sort.ascending; -import static dev.morphia.query.experimental.filters.Filters.eq; -import static dev.morphia.query.experimental.filters.Filters.in; -import static dev.morphia.query.experimental.filters.Filters.ne; -import static dev.morphia.query.experimental.filters.Filters.or; +import static dev.morphia.query.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.in; +import static dev.morphia.query.filters.Filters.ne; +import static dev.morphia.query.filters.Filters.or; import static eu.europeana.entitymanagement.definitions.EntityRecordFields.DISABLED; import static eu.europeana.entitymanagement.definitions.EntityRecordFields.ENTITY_AGGREGATED_VIA; import static eu.europeana.entitymanagement.definitions.EntityRecordFields.ENTITY_EXACT_MATCH; @@ -22,8 +22,8 @@ import com.mongodb.client.result.UpdateResult; import dev.morphia.query.FindOptions; import dev.morphia.query.Query; -import dev.morphia.query.experimental.filters.Filter; -import dev.morphia.query.experimental.updates.UpdateOperators; +import dev.morphia.query.filters.Filter; +import dev.morphia.query.updates.UpdateOperators; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.model.EntityIdGenerator; import eu.europeana.entitymanagement.definitions.model.EntityRecord; @@ -163,8 +163,8 @@ public EntityRecord save(EntityRecord entityRecord) { /** Drops the EntityRecord and Entity ID generator collections. */ public void dropCollection() { - getDataStore().getMapper().getCollection(EntityRecord.class).drop(); - getDataStore().getMapper().getCollection(EntityIdGenerator.class).drop(); + getDataStore().getCollection(EntityRecord.class).drop(); + getDataStore().getCollection(EntityIdGenerator.class).drop(); } /** diff --git a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/VocabularyRepository.java b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/VocabularyRepository.java index 1467277c6..5d142f62f 100644 --- a/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/VocabularyRepository.java +++ b/entity-management-mongo/src/main/java/eu/europeana/entitymanagement/mongo/repository/VocabularyRepository.java @@ -1,12 +1,12 @@ package eu.europeana.entitymanagement.mongo.repository; -import static dev.morphia.query.experimental.filters.Filters.in; +import static dev.morphia.query.filters.Filters.in; import java.util.ArrayList; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Repository; import dev.morphia.Datastore; -import dev.morphia.query.experimental.filters.Filter; +import dev.morphia.query.filters.Filter; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.model.Vocabulary; @@ -55,7 +55,7 @@ public List saveBulk(List vocabs) { * clear database collection */ public void dropCollection() { - datastore.getMapper().getCollection(Vocabulary.class).drop(); + datastore.getCollection(Vocabulary.class).drop(); } /** diff --git a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/service/ScheduledTaskServiceIT.java b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/service/ScheduledTaskServiceIT.java index 2bbed29a6..f169f79da 100644 --- a/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/service/ScheduledTaskServiceIT.java +++ b/entity-management-tests/src/integration-test/java/eu/europeana/entitymanagement/service/ScheduledTaskServiceIT.java @@ -19,8 +19,8 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import com.mongodb.assertions.Assertions; -import dev.morphia.query.experimental.filters.Filter; -import dev.morphia.query.experimental.filters.Filters; +import dev.morphia.query.filters.Filter; +import dev.morphia.query.filters.Filters; import eu.europeana.entitymanagement.AbstractIntegrationTest; import eu.europeana.entitymanagement.batch.config.EntityUpdateJobConfig; import eu.europeana.entitymanagement.batch.repository.FailedTaskRepository; diff --git a/entity-management-tests/src/integration-test/resources/application.properties b/entity-management-tests/src/integration-test/resources/application.properties index 3e08d5864..62d919b43 100644 --- a/entity-management-tests/src/integration-test/resources/application.properties +++ b/entity-management-tests/src/integration-test/resources/application.properties @@ -7,3 +7,10 @@ mongo.truststore= # Whether a "NoHandlerFoundException" should be thrown if no Handler was found to process a request. spring.mvc.throw-exception-if-no-handler-found=true spring.resources.add-mappings=false + +# SG: should fix cyclic dependencies +#The dependencies of some of the beans in the application context form a cycle: +# entityManagementApp (field private eu.europeana.entitymanagement.batch.service.BatchEntityUpdateExecutor eu.europeana.entitymanagement.EntityManagementApp.batchUpdateExecutor) +# batchEntityUpdateExecutor defined in file [C:\java\git\europeana\entity-management\entity-management-web\target\classes\eu\europeana\entitymanagement\batch\service\BatchEntityUpdateExecutor.class] +#| jobLauncherConfig +spring.main.allow-circular-references=true diff --git a/entity-management-web/pom.xml b/entity-management-web/pom.xml index 0c6d1e94d..1e41aaf5b 100644 --- a/entity-management-web/pom.xml +++ b/entity-management-web/pom.xml @@ -93,6 +93,14 @@ xml-apis xml-apis + + dev.morphia.morphia + core + + + org.mongodb + mongodb-driver-legacy + diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/config/EntityUpdateJobConfig.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/config/EntityUpdateJobConfig.java index 6b7bbb794..03fc978fb 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/config/EntityUpdateJobConfig.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/config/EntityUpdateJobConfig.java @@ -11,7 +11,7 @@ import static eu.europeana.entitymanagement.definitions.EntityRecordFields.ENTITY_ID; import static eu.europeana.entitymanagement.definitions.batch.EMBatchConstants.UPDATE_TYPE; -import dev.morphia.query.experimental.filters.Filters; +import dev.morphia.query.filters.Filters; import eu.europeana.entitymanagement.batch.listener.EntityUpdateStepListener; import eu.europeana.entitymanagement.batch.listener.ScheduledTaskItemListener; import eu.europeana.entitymanagement.batch.processor.EntityConsolidationProcessor; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/EntityRecordDatabaseReader.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/EntityRecordDatabaseReader.java index e934f58e4..0e88f615b 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/EntityRecordDatabaseReader.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/EntityRecordDatabaseReader.java @@ -7,7 +7,7 @@ import org.apache.logging.log4j.Logger; import org.springframework.batch.item.ItemReader; import org.springframework.lang.NonNull; -import dev.morphia.query.experimental.filters.Filter; +import dev.morphia.query.filters.Filter; import eu.europeana.entitymanagement.batch.utils.BatchUtils; import eu.europeana.entitymanagement.definitions.batch.ScheduledTaskUtils; import eu.europeana.entitymanagement.definitions.batch.model.BatchEntityRecord; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/ScheduledTaskDatabaseReader.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/ScheduledTaskDatabaseReader.java index 8e7ee9eea..154e226f3 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/ScheduledTaskDatabaseReader.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/reader/ScheduledTaskDatabaseReader.java @@ -5,7 +5,7 @@ import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; import org.springframework.lang.NonNull; -import dev.morphia.query.experimental.filters.Filter; +import dev.morphia.query.filters.Filter; import eu.europeana.entitymanagement.batch.service.ScheduledTaskService; import eu.europeana.entitymanagement.definitions.batch.model.BatchEntityRecord; import eu.europeana.entitymanagement.definitions.batch.model.ScheduledTask; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/FailedTaskRepository.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/FailedTaskRepository.java index 3bb5efed1..f2fa36d47 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/FailedTaskRepository.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/FailedTaskRepository.java @@ -1,8 +1,8 @@ package eu.europeana.entitymanagement.batch.repository; import static dev.morphia.query.Sort.ascending; -import static dev.morphia.query.experimental.filters.Filters.eq; -import static dev.morphia.query.experimental.filters.Filters.in; +import static dev.morphia.query.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.in; import static eu.europeana.entitymanagement.definitions.batch.EMBatchConstants.*; import static eu.europeana.entitymanagement.mongo.utils.MorphiaUtils.MULTI_DELETE_OPTS; import static eu.europeana.entitymanagement.mongo.utils.MorphiaUtils.UPSERT_OPTS; @@ -14,7 +14,7 @@ import com.mongodb.client.result.UpdateResult; import dev.morphia.Datastore; import dev.morphia.query.FindOptions; -import dev.morphia.query.experimental.updates.UpdateOperators; +import dev.morphia.query.updates.UpdateOperators; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.batch.model.FailedTask; import java.util.ArrayList; @@ -41,7 +41,8 @@ public FailedTaskRepository( /** Morphia doesn't map the indexes on {@link FailedTask}. Explicitly set this up here */ @Override public void afterPropertiesSet() { - datastore.ensureIndexes(FailedTask.class); + //SG: TODO should be created by the datastore, need to check + //datastore.ensureIndexes(FailedTask.class); } /** @@ -75,7 +76,7 @@ public UpdateResult upsert(FailedTask failure) { * @return BulkWriteResult of db query */ public BulkWriteResult upsertBulk(List failures) { - MongoCollection collection = datastore.getMapper().getCollection(FailedTask.class); + MongoCollection collection = datastore.getCollection(FailedTask.class); List> updates = new ArrayList<>(); @@ -156,6 +157,6 @@ public List getFailures(List entityIds) { /** Drops the FailedTask collection */ public void dropCollection() { - datastore.getMapper().getCollection(FailedTask.class).drop(); + datastore.getCollection(FailedTask.class).drop(); } } diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/ScheduledTaskRepository.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/ScheduledTaskRepository.java index ae0ba4abc..bac6999d3 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/ScheduledTaskRepository.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/repository/ScheduledTaskRepository.java @@ -1,10 +1,10 @@ package eu.europeana.entitymanagement.batch.repository; import static dev.morphia.query.Sort.ascending; -import static dev.morphia.query.experimental.filters.Filters.eq; -import static dev.morphia.query.experimental.filters.Filters.gte; -import static dev.morphia.query.experimental.filters.Filters.in; -import static dev.morphia.query.experimental.filters.Filters.or; +import static dev.morphia.query.filters.Filters.eq; +import static dev.morphia.query.filters.Filters.gte; +import static dev.morphia.query.filters.Filters.in; +import static dev.morphia.query.filters.Filters.or; import static eu.europeana.entitymanagement.definitions.batch.EMBatchConstants.CREATED; import static eu.europeana.entitymanagement.definitions.batch.EMBatchConstants.DOC_SET; import static eu.europeana.entitymanagement.definitions.batch.EMBatchConstants.DOC_SET_ON_INSERT; @@ -30,12 +30,12 @@ import com.mongodb.client.model.UpdateOneModel; import com.mongodb.client.model.WriteModel; import dev.morphia.Datastore; -import dev.morphia.aggregation.experimental.stages.Lookup; -import dev.morphia.aggregation.experimental.stages.Projection; -import dev.morphia.aggregation.experimental.stages.Unwind; +import dev.morphia.aggregation.stages.Lookup; +import dev.morphia.aggregation.stages.Projection; +import dev.morphia.aggregation.stages.Unwind; import dev.morphia.query.FindOptions; -import dev.morphia.query.experimental.filters.Filter; -import dev.morphia.query.internal.MorphiaCursor; +import dev.morphia.query.MorphiaCursor; +import dev.morphia.query.filters.Filter; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.batch.model.FailedTask; import eu.europeana.entitymanagement.definitions.batch.model.ScheduledTask; @@ -55,7 +55,8 @@ public ScheduledTaskRepository( @Override public void afterPropertiesSet() { - datastore.ensureIndexes(ScheduledTask.class); + //SG: TODO should be created by the datastore, need to check + //datastore.ensureIndexes(ScheduledTask.class); } /** @@ -75,7 +76,7 @@ public BulkWriteResult markAsProcessed(@NonNull List tasks) { new Document(DOC_SET, new Document(HAS_BEEN_PROCESSED, task.hasBeenProcessed()) .append(MODIFIED, task.getModified())))); } - return datastore.getMapper().getCollection(ScheduledTask.class).bulkWrite(updates); + return datastore.getCollection(ScheduledTask.class).bulkWrite(updates); } /** @@ -86,7 +87,7 @@ public BulkWriteResult markAsProcessed(@NonNull List tasks) { */ public BulkWriteResult upsertBulk(@NonNull List tasks) { MongoCollection collection = - datastore.getMapper().getCollection(ScheduledTask.class); + datastore.getCollection(ScheduledTask.class); List> updates = new ArrayList<>(tasks.size()); @@ -183,7 +184,7 @@ public List getTasks(List entityIds) { } public void dropCollection() { - datastore.getMapper().getCollection(ScheduledTask.class).drop(); + datastore.getCollection(ScheduledTask.class).drop(); } /** diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/service/ScheduledTaskService.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/service/ScheduledTaskService.java index 2cf14cf7c..b327ea9f0 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/service/ScheduledTaskService.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/batch/service/ScheduledTaskService.java @@ -10,8 +10,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.mongodb.bulk.BulkWriteResult; -import dev.morphia.query.experimental.filters.Filter; -import dev.morphia.query.internal.MorphiaCursor; +import dev.morphia.query.MorphiaCursor; +import dev.morphia.query.filters.Filter; import eu.europeana.entitymanagement.batch.repository.ScheduledTaskRepository; import eu.europeana.entitymanagement.common.vocabulary.AppConfigConstants; import eu.europeana.entitymanagement.definitions.batch.model.ScheduledTask; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/mongo/repository/ZohoSyncRepository.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/mongo/repository/ZohoSyncRepository.java index fd8c1a9a4..d8353e94a 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/mongo/repository/ZohoSyncRepository.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/mongo/repository/ZohoSyncRepository.java @@ -33,7 +33,7 @@ public long count() { /** Drops the ConceptScheme collection. */ public void dropCollection() { - getDataStore().getMapper().getCollection(ZohoSyncReport.class).drop(); + getDataStore().getCollection(ZohoSyncReport.class).drop(); } public ZohoSyncReport findLastZohoSyncReport() { diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/EntityRecordService.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/EntityRecordService.java index 36116c74d..cc821450d 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/EntityRecordService.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/EntityRecordService.java @@ -20,7 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.mongodb.client.result.UpdateResult; -import dev.morphia.query.experimental.filters.Filter; +import dev.morphia.query.filters.Filter; import eu.europeana.api.commons.error.EuropeanaApiException; import eu.europeana.entitymanagement.common.config.DataSource; import eu.europeana.entitymanagement.common.config.EntityManagementConfiguration; diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/RequestPathMethodService.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/RequestPathMethodService.java index c59890106..7e777749a 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/RequestPathMethodService.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/RequestPathMethodService.java @@ -1,14 +1,13 @@ package eu.europeana.entitymanagement.web.service; -import eu.europeana.api.commons.web.service.AbstractRequestPathMethodService; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication; import org.springframework.stereotype.Service; import org.springframework.web.context.WebApplicationContext; +import eu.europeana.api.commons.web.service.AbstractRequestPathMethodService; /** This service is used to populate the Allow header in API responses. */ -@Service -@ConditionalOnWebApplication +@Service(value = "requestPathMethodService") +//@ConditionalOnWebApplication public class RequestPathMethodService extends AbstractRequestPathMethodService { @Autowired diff --git a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java index c0ca6fed5..5f56dbbbc 100644 --- a/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java +++ b/entity-management-web/src/main/java/eu/europeana/entitymanagement/web/service/ZohoSyncService.java @@ -13,8 +13,8 @@ import org.springframework.stereotype.Service; import com.zoho.crm.api.record.DeletedRecord; import com.zoho.crm.api.record.Record; -import dev.morphia.query.experimental.filters.Filter; -import dev.morphia.query.experimental.filters.Filters; +import dev.morphia.query.filters.Filter; +import dev.morphia.query.filters.Filters; import eu.europeana.api.commons.definitions.utils.DateUtils; import eu.europeana.api.commons.web.model.vocabulary.Operations; import eu.europeana.entitymanagement.batch.service.EntityUpdateService; diff --git a/pom.xml b/pom.xml index fcdc12bc9..3f6ef193d 100644 --- a/pom.xml +++ b/pom.xml @@ -38,10 +38,10 @@ - eu.europeana.api - entity-management - 1.6.4-SNAPSHOT - pom + eu.europeana.api + entity-management + 1.6.4-SNAPSHOT + pom Entity Management Service for managing entity data from external sources and @@ -51,6 +51,32 @@ 17 ${java.version} ${java.version} + + + 0.3.25-SNAPSHOT + 1.0.7-SNAPSHOT + 2.15.4 + + + 2.4.13 + 4.7.2 + 3.0.1 + + + 2.5.14 + 3.0.0 + + 2.11.4 + 4.1.69.Final + 2.3.3 + 10.5 + + + 4.9.0 + 1.16.0 + + + entity-management-tests/target/site/jacoco-aggregate/jacoco.xml ${aggregate.report.xml} @@ -61,20 +87,7 @@ https://sonarcloud.io **/model/**/* - 0.3.22 - 1.0.3 - 2.15.4 - 2.11.4 - 4.1.69.Final - 2.5.5 - 3.0.0 - 2.1.4 - 4.9.0 - 1.16.0 1.7 - 3.0.1 - 2.3.3 - 10.5 3.1 5.0.0 3.0.0-M5 @@ -96,6 +109,37 @@ + + + dev.morphia.morphia + morphia-core + ${morphia.version} + + + + org.mongodb + mongodb-driver-sync + ${mongodb-driver.version} + + + org.mongodb + mongodb-driver-legacy + ${mongodb-driver.version} + + + + org.mongodb + mongodb-driver-core + ${mongodb-driver.version} + + + + + org.mongodb + bson + ${mongodb-driver.version} + + @@ -191,7 +235,7 @@ - + org.codehaus.mojo build-helper-maven-plugin @@ -332,7 +376,8 @@ - + org.jacoco jacoco-maven-plugin ${jacoco-plugin.version}