Add: Database, Data Access Settings
This commit is contained in:
@@ -37,10 +37,13 @@ dependencies {
|
||||
compileOnly 'org.projectlombok:lombok'
|
||||
annotationProcessor 'org.projectlombok:lombok'
|
||||
|
||||
implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.2.0'
|
||||
runtimeOnly 'com.h2database:h2'
|
||||
|
||||
implementation 'org.springframework.boot:spring-boot-starter-validation'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||
|
||||
testImplementation 'io.github.javaunit:autoparams:0.2.11'
|
||||
testImplementation 'io.github.javaunit:autoparams:0.2.12'
|
||||
testImplementation 'com.tngtech.archunit:archunit-junit5:0.20.1'
|
||||
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.yam.app.account.infrastructure;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder;
|
||||
import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType;
|
||||
|
||||
@Configuration
|
||||
public class DatabaseConfiguration {
|
||||
|
||||
@Bean
|
||||
public DataSource dataSource() {
|
||||
return new EmbeddedDatabaseBuilder()
|
||||
.setType(EmbeddedDatabaseType.H2)
|
||||
.build();
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
|
||||
2
src/main/resources/application.yml
Normal file
2
src/main/resources/application.yml
Normal file
@@ -0,0 +1,2 @@
|
||||
mybatis:
|
||||
mapper-locations: mapper/xml/*.xml
|
||||
0
src/main/resources/mapper/xml/empty.txt
Normal file
0
src/main/resources/mapper/xml/empty.txt
Normal file
Reference in New Issue
Block a user