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"
|
image: "mariadb/server:10.3"
|
||||||
container_name: seb-server-mariadb
|
container_name: seb-server-mariadb
|
||||||
environment:
|
environment:
|
||||||
MYSQL_ROOT_PASSWORD:
|
MYSQL_ROOT_PASSWORD: somePW
|
||||||
ports:
|
ports:
|
||||||
- 3306:3306
|
- 3306:3306
|
||||||
networks:
|
networks:
|
||||||
|
@ -22,9 +22,9 @@ services:
|
||||||
- SERVER_PORT=8080
|
- SERVER_PORT=8080
|
||||||
- DBSERVER_ADDRESS=seb-server-mariadb
|
- DBSERVER_ADDRESS=seb-server-mariadb
|
||||||
- DBSERVER_PORT=3306
|
- DBSERVER_PORT=3306
|
||||||
- DBSERVER_PWD=
|
- DBSERVER_PWD=somePW
|
||||||
- GUICLIENT_PWD=
|
- GUICLIENT_PWD=somePW
|
||||||
- INTERNAL_PWD=
|
- INTERNAL_PWD=somePW
|
||||||
ports:
|
ports:
|
||||||
- 8080:8080
|
- 8080:8080
|
||||||
networks:
|
networks:
|
||||||
|
|
|
@ -19,7 +19,6 @@ import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
|
||||||
|
|
||||||
|
@ -50,7 +49,6 @@ public class BatisConfig {
|
||||||
public static final String SQL_SESSION_FACTORY = "sqlSessionFactory";
|
public static final String SQL_SESSION_FACTORY = "sqlSessionFactory";
|
||||||
|
|
||||||
/** Transaction manager bean for MyBatis based Spring controlled transactions */
|
/** Transaction manager bean for MyBatis based Spring controlled transactions */
|
||||||
@Lazy
|
|
||||||
@Bean(name = SQL_SESSION_FACTORY)
|
@Bean(name = SQL_SESSION_FACTORY)
|
||||||
public SqlSessionFactory sqlSessionFactory(final DataSource dataSource) throws Exception {
|
public SqlSessionFactory sqlSessionFactory(final DataSource dataSource) throws Exception {
|
||||||
final SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
|
final SqlSessionFactoryBean factoryBean = new SqlSessionFactoryBean();
|
||||||
|
@ -59,7 +57,6 @@ public class BatisConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** SQL session template bean of MyBatis */
|
/** SQL session template bean of MyBatis */
|
||||||
@Lazy
|
|
||||||
@Bean(name = SQL_SESSION_TEMPLATE)
|
@Bean(name = SQL_SESSION_TEMPLATE)
|
||||||
@Primary
|
@Primary
|
||||||
public SqlSessionTemplate sqlSessionTemplate(final DataSource dataSource) throws Exception {
|
public SqlSessionTemplate sqlSessionTemplate(final DataSource dataSource) throws Exception {
|
||||||
|
@ -67,7 +64,6 @@ public class BatisConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** SQL session template bean of MyBatis with BATCH enabled */
|
/** SQL session template bean of MyBatis with BATCH enabled */
|
||||||
@Lazy
|
|
||||||
@Bean(name = SQL_BATCH_SESSION_TEMPLATE)
|
@Bean(name = SQL_BATCH_SESSION_TEMPLATE)
|
||||||
public SqlSessionTemplate sqlBatchSessionTemplate(final DataSource dataSource) throws Exception {
|
public SqlSessionTemplate sqlBatchSessionTemplate(final DataSource dataSource) throws Exception {
|
||||||
return new SqlSessionTemplate(
|
return new SqlSessionTemplate(
|
||||||
|
@ -76,7 +72,6 @@ public class BatisConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** SQL session factory bean of MyBatis */
|
/** SQL session factory bean of MyBatis */
|
||||||
@Lazy
|
|
||||||
@Bean(name = TRANSACTION_MANAGER)
|
@Bean(name = TRANSACTION_MANAGER)
|
||||||
public DataSourceTransactionManager transactionManager(final DataSource dataSource) {
|
public DataSourceTransactionManager transactionManager(final DataSource dataSource) {
|
||||||
final DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
|
final DataSourceTransactionManager transactionManager = new DataSourceTransactionManager();
|
||||||
|
|
Loading…
Reference in a new issue