This commit is contained in:
sejoung kim
2021-06-23 14:30:06 +09:00
parent 25b5dead1e
commit 84cf3d1577
9 changed files with 50 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ spring:
show-sql: true
open-in-view: false
hibernate:
ddl-auto: create-drop
ddl-auto: validate
properties:
hibernate:
discriminator:

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
<include resource="org/springframework/boot/logging/logback/console-appender.xml" />
<logger name="org.springframework" level="INFO" />
<logger name="io.github.sejoung" level="DEBUG" />
<root level="INFO">
<appender-ref ref="CONSOLE" />
</root>
</configuration>

View File

@@ -9,7 +9,9 @@ import org.springframework.boot.test.autoconfigure.orm.jpa.DataJpaTest;
import io.github.sejoung.product.persistence.repository.ProductRepository;
import io.github.sejoung.product.persistence.util.TestUtil;
import lombok.extern.slf4j.Slf4j;
@Slf4j
@DataJpaTest
class SaveRoundProductServiceTest {
@@ -26,6 +28,8 @@ class SaveRoundProductServiceTest {
@Test
void saveRoundProduct() {
var actual = service.saveRoundProduct(TestUtil.defaultRoundProduct());
log.debug("{}",actual);
assertThat(actual.getProductId()).isNotNull();
}
}

View File

@@ -0,0 +1,9 @@
spring:
jpa:
hibernate:
ddl-auto: create-drop
properties:
hibernate:
discriminator:
ignore_explicit_for_joined: true
database-platform: org.hibernate.dialect.H2Dialect

View File

@@ -0,0 +1,24 @@
plugins {
id 'java'
id 'org.springframework.boot' version '2.5.1'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
implementation project(':domain')
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-validation'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
test {
useJUnitPlatform()
}