From 5cfdce8a7eca27ebf239fdf79281a1c890ae647f Mon Sep 17 00:00:00 2001 From: anhefti Date: Fri, 23 Aug 2019 12:14:13 +0200 Subject: [PATCH] fixed startup --- docker/demo/docker-compose.yml | 8 ++++---- .../sebserver/webservice/datalayer/batis/BatisConfig.java | 5 ----- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/docker/demo/docker-compose.yml b/docker/demo/docker-compose.yml index b715adbd..8e686b50 100644 --- a/docker/demo/docker-compose.yml +++ b/docker/demo/docker-compose.yml @@ -4,7 +4,7 @@ services: image: "mariadb/server:10.3" container_name: seb-server-mariadb environment: - MYSQL_ROOT_PASSWORD: + MYSQL_ROOT_PASSWORD: somePW ports: - 3306:3306 networks: @@ -22,9 +22,9 @@ services: - SERVER_PORT=8080 - DBSERVER_ADDRESS=seb-server-mariadb - DBSERVER_PORT=3306 - - DBSERVER_PWD= - - GUICLIENT_PWD= - - INTERNAL_PWD= + - DBSERVER_PWD=somePW + - GUICLIENT_PWD=somePW + - INTERNAL_PWD=somePW ports: - 8080:8080 networks: diff --git a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/BatisConfig.java b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/BatisConfig.java index d2ca037a..3dca61e0 100644 --- a/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/BatisConfig.java +++ b/src/main/java/ch/ethz/seb/sebserver/webservice/datalayer/batis/BatisConfig.java @@ -19,7 +19,6 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; -import org.springframework.context.annotation.Lazy; import org.springframework.context.annotation.Primary; import org.springframework.jdbc.datasource.DataSourceTransactionManager; @@ -50,7 +49,6 @@ public class BatisConfig { public static final String SQL_SESSION_FACTORY = "sqlSessionFactory"; /** Transaction manager bean for MyBatis based Spring controlled transactions */ - @Lazy @Bean(name = SQL_SESSION_FACTORY) public SqlSessionFactory sqlSessionFactory(final DataSource dataSource) throws Exception { final SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean(); @@ -59,7 +57,6 @@ public class BatisConfig { } /** SQL session template bean of MyBatis */ - @Lazy @Bean(name = SQL_SESSION_TEMPLATE) @Primary public SqlSessionTemplate sqlSessionTemplate(final DataSource dataSource) throws Exception { @@ -67,7 +64,6 @@ public class BatisConfig { } /** SQL session template bean of MyBatis with BATCH enabled */ - @Lazy @Bean(name = SQL_BATCH_SESSION_TEMPLATE) public SqlSessionTemplate sqlBatchSessionTemplate(final DataSource dataSource) throws Exception { return new SqlSessionTemplate( @@ -76,7 +72,6 @@ public class BatisConfig { } /** SQL session factory bean of MyBatis */ - @Lazy @Bean(name = TRANSACTION_MANAGER) public DataSourceTransactionManager transactionManager(final DataSource dataSource) { final DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();