test후 테이블 삭제...
520
작성한 질문수 1
안녕하세요. 제가 강의 마지막쯤에 test를 진행했는데 h2콘솔에 가보니 table이 없다고 나와서 run한 결과를 보니 Hibernate: drop table if exists member CASCADE이런 문장이 있습니다...
Hibernate: drop table if exists member CASCADE
Hibernate: create table member (id bigint generated by default as identity, name varchar(255), primary key (id))
2020-12-07 14:55:27.323 INFO 19008 --- [ task-1] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]
2020-12-07 14:55:27.334 INFO 19008 --- [ task-1] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'
2020-12-07 14:55:27.414 INFO 19008 --- [ main] o.s.t.c.transaction.TransactionContext : Began transaction (1) for test context [DefaultTestContext@5b619d14 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@736b21ee, testMethod = 회원가입@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@66746f57 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@33ecda92, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@dc7df28, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4d14b6c2, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@20b2475a, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@4516af24], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true]]; transaction manager [org.springframework.orm.jpa.JpaTransactionManager@7aa01bd9]; rollback [false]
Hibernate: select member0_.id as id1_0_, member0_.name as name2_0_ from member member0_ where member0_.name=?
Hibernate: insert into member (id, name) values (null, ?)
2020-12-07 14:55:27.717 INFO 19008 --- [ main] o.s.t.c.transaction.TransactionContext : Committed transaction for test: [DefaultTestContext@5b619d14 testClass = MemberServiceIntegrationTest, testInstance = hello.hellospring.service.MemberServiceIntegrationTest@736b21ee, testMethod = 회원가입@MemberServiceIntegrationTest, testException = [null], mergedContextConfiguration = [WebMergedContextConfiguration@66746f57 testClass = MemberServiceIntegrationTest, locations = '{}', classes = '{class hello.hellospring.HelloSpringApplication}', contextInitializerClasses = '[]', activeProfiles = '{}', propertySourceLocations = '{}', propertySourceProperties = '{org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true}', contextCustomizers = set[org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizerFactory$Customizer@33ecda92, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@dc7df28, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@4d14b6c2, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@20b2475a, org.springframework.boot.test.context.SpringBootTestArgs@1, org.springframework.boot.test.context.SpringBootTestWebEnvironment@4516af24], resourceBasePath = 'src/main/webapp', contextLoader = 'org.springframework.boot.test.context.SpringBootContextLoader', parent = [null]], attributes = map['org.springframework.test.context.web.ServletTestExecutionListener.activateListener' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.populatedRequestContextHolder' -> true, 'org.springframework.test.context.web.ServletTestExecutionListener.resetRequestContextHolder' -> true]]
2020-12-07 14:55:27.738 INFO 19008 --- [extShutdownHook] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2020-12-07 14:55:27.739 INFO 19008 --- [extShutdownHook] .SchemaDropperImpl$DelayedDropActionImpl : HHH000477: Starting delayed evictData of schema as part of SessionFactory shut-down'
Hibernate: drop table if exists member CASCADE
2020-12-07 14:55:27.744 INFO 19008 --- [extShutdownHook] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2020-12-07 14:55:27.744 INFO 19008 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
2020-12-07 14:55:27.752 INFO 19008 --- [extShutdownHook] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
Process finished with exit code 0
결과 이미지 입니다... 왜 이런건지 혹시 알수 있을까요??
매번 좋은강의 감사합니다!!
답변 2
1
안녕하세요. 오근혁님
application.properties에 다음 설정이 있는지 확인해주세요^^
spring.jpa.hibernate.ddl-auto=none
감사합니다.
..
0
74
2
Unused property.....
0
98
2
project JDK is misconfigured
0
130
2
외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석
0
82
2
단위/통합 테스트 버전충돌 문제
0
91
2
❗️springboot 4.0.2 버전 aspectj dependency 설정❗️
0
228
1
왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?
0
102
2
윈도우 build test오류 질문
1
102
2
테스트 관련 공부에 대한 조언을 얻고 싶습니다
0
98
2
테스트 실행 시 에러 질문
0
289
1
name을 통한 비교와 객체를 통한 비교
0
77
1
빌드 후 libs 없음
1
128
1
윈도우 gradlew.bat 에러
0
167
1
@PostMapping("/members/new")가 동작하지 않습니다
0
88
1
java static class와 kotlin class
0
77
1
스프링 DB연결
0
126
1
소요 시간
0
85
2
ddl.sql에 빨간 밑줄
1
101
2
welcome page 에러
0
180
3
잘 모르겠습니다.
0
163
2
fail을 똑같이 쳤는데 오류가 발생해요
0
156
2
index.html Welcome page
0
121
1
프로젝트 gradle-groovy ?
0
364
1
테스트코드 메서드명 한글
0
199
2





