fixed startup
This commit is contained in:
parent
17bbdb5ade
commit
5cfdce8a7e
2 changed files with 4 additions and 9 deletions
|
@ -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:
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue