From 17bbdb5ade4eb6644bce7d7c1273fb0e73d6f0fe Mon Sep 17 00:00:00 2001 From: anhefti Date: Fri, 23 Aug 2019 11:57:44 +0200 Subject: [PATCH] fixed startup --- docker/demo/docker-compose.yml | 4 ++-- src/main/java/ch/ethz/seb/sebserver/SEBServer.java | 4 ---- .../sebserver/webservice/servicelayer/dao/EntityDAO.java | 2 ++ .../servicelayer/dao/impl/ConfigurationDAOBatchService.java | 6 ++++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/docker/demo/docker-compose.yml b/docker/demo/docker-compose.yml index 5eb6d8e4..b715adbd 100644 --- a/docker/demo/docker-compose.yml +++ b/docker/demo/docker-compose.yml @@ -14,8 +14,8 @@ services: build: context: . args: - - GIT_TAG= - - SEBSERVER_VERSION=0.4.0-SNAPSHOT + - GIT_TAG=v0.4.1-beta + - SEBSERVER_VERSION=0.4.1-SNAPSHOT container_name: seb-server environment: - SERVER_ADDRESS=0.0.0.0 diff --git a/src/main/java/ch/ethz/seb/sebserver/SEBServer.java b/src/main/java/ch/ethz/seb/sebserver/SEBServer.java index 6c24b489..e0d32da0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/SEBServer.java +++ b/src/main/java/ch/ethz/seb/sebserver/SEBServer.java @@ -12,9 +12,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.security.servlet.UserDetailsServiceAutoConfiguration; import org.springframework.cache.annotation.EnableCaching; -import org.springframework.context.annotation.Import; - -import ch.ethz.seb.sebserver.webservice.datalayer.batis.BatisConfig; /** SEB-Server (Safe Exam Browser Server) is a server component to maintain and support * Exams running with SEB (Safe Exam Browser). TODO add link(s) @@ -35,7 +32,6 @@ import ch.ethz.seb.sebserver.webservice.datalayer.batis.BatisConfig; UserDetailsServiceAutoConfiguration.class, }) @EnableCaching -@Import(BatisConfig.class) public class SEBServer { public static void main(final String[] args) { diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java index a7307c90..96adb61b 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/EntityDAO.java @@ -18,6 +18,7 @@ import java.util.stream.Collectors; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.context.annotation.DependsOn; import org.springframework.transaction.annotation.Transactional; import ch.ethz.seb.sebserver.gbl.api.EntityType; @@ -32,6 +33,7 @@ import ch.ethz.seb.sebserver.gbl.util.Utils; * * @param The specific type of the Entity domain model * @param The specific type of the Entity domain model to create a new Entity */ +@DependsOn("batisConfig") public interface EntityDAO { Logger log = LoggerFactory.getLogger(EntityDAO.class); diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java index 5ddfd06b..3e1c360f 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/servicelayer/dao/impl/ConfigurationDAOBatchService.java @@ -25,6 +25,7 @@ import org.mybatis.spring.SqlSessionTemplate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.DependsOn; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; @@ -55,11 +56,12 @@ import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationRecor import ch.ethz.seb.sebserver.webservice.datalayer.batis.model.ConfigurationValueRecord; import ch.ethz.seb.sebserver.webservice.servicelayer.dao.ResourceNotFoundException; +/** This service is internally used to implement MyBatis batch functionality for the most + * intensive write operation on Configuration domain. */ @Lazy @Component @WebServiceProfile -/** This service is internally used to implement MyBatis batch functionality for the most - * intensive write operation on Configuration domain. */ +@DependsOn("batisConfig") class ConfigurationDAOBatchService { private static final Logger log = LoggerFactory.getLogger(ConfigurationDAOBatchService.class);