From 70094a5a60f2e4df4e8e32a95297e6fa689f40ee Mon Sep 17 00:00:00 2001 From: anhefti Date: Thu, 4 Jul 2019 12:26:25 +0200 Subject: [PATCH] code cleanup and adapt demo properties --- .../session/ClientIndicatorService.java | 13 ------------- .../servicelayer/session/EventHandlingStrategy.java | 4 ++-- .../session/impl/AsyncBatchEventSaveStrategy.java | 5 ----- .../session/impl/SingleEventSaveStrategy.java | 5 ----- .../resources/config/application-demo.properties | 6 +++++- 5 files changed, 7 insertions(+), 26 deletions(-) delete mode 100644 src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicatorService.java diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicatorService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicatorService.java deleted file mode 100644 index f88a314d..00000000 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/ClientIndicatorService.java +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Copyright (c) 2019 ETH Zürich, Educational Development and Technology (LET) - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -package ch.ethz.seb.sebserver.webservice.servicelayer.session; - -public interface ClientIndicatorService { - -} diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/EventHandlingStrategy.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/EventHandlingStrategy.java index b4fd59b0..2b892419 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/EventHandlingStrategy.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/EventHandlingStrategy.java @@ -20,8 +20,8 @@ public interface EventHandlingStrategy extends Consumer { String EVENT_CONSUMER_STRATEGY_SINGLE_EVENT_STORE = "SINGLE_EVENT_STORE_STRATEGY"; String EVENT_CONSUMER_STRATEGY_ASYNC_BATCH_STORE = "ASYNC_BATCH_STORE_STRATEGY"; + /** This enables a certain EventHandlingStrategy to be the executing and EventHandlingStrategy + * and will be re-initialized on server restart */ void enable(); - void disable(); - } diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AsyncBatchEventSaveStrategy.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AsyncBatchEventSaveStrategy.java index 2e2b0cb6..1ba44adc 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AsyncBatchEventSaveStrategy.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/AsyncBatchEventSaveStrategy.java @@ -82,11 +82,6 @@ public class AsyncBatchEventSaveStrategy implements EventHandlingStrategy { } - @Override - public void disable() { - this.enabled = false; - } - @EventListener(ApplicationReadyEvent.class) protected void recover() { if (this.enabled) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SingleEventSaveStrategy.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SingleEventSaveStrategy.java index 4833ce56..fe784619 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SingleEventSaveStrategy.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/session/impl/SingleEventSaveStrategy.java @@ -49,11 +49,6 @@ public class SingleEventSaveStrategy implements EventHandlingStrategy { } - @Override - public void disable() { - this.enabled = false; - } - public boolean isEnabled() { return this.enabled; } diff --git a/src/main/resources/config/application-demo.properties b/src/main/resources/config/application-demo.properties index 13d75a00..84feed87 100644 --- a/src/main/resources/config/application-demo.properties +++ b/src/main/resources/config/application-demo.properties @@ -10,7 +10,7 @@ spring.datasource.url=jdbc:h2:mem:demo;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_ spring.datasource.driver-class-name=org.h2.Driver spring.datasource.platform=demo -management.endpoints.web.base-path=/actuator +logging.file=log/sebserver.log sebserver.webservice.http.scheme=http sebserver.webservice.api.admin.clientId=guiClient @@ -27,6 +27,10 @@ sebserver.webservice.api.pagination.maxPageSize=500 # comma separated list of known possible OpenEdX API access token request endpoints sebserver.webservice.lms.openedx.api.token.request.paths=/oauth2/access_token +# actuator configuration +management.endpoints.web.base-path=/actuator +management.endpoints.web.exposure.include=logfile,loggers + sebserver.gui.entrypoint=/gui sebserver.gui.webservice.protocol=http sebserver.gui.webservice.address=0.0.0.0