8:54 강의와 다른 오류가 발생했습니다!
8분 54초 강의와 마찬가지로 MemberServiceIntegrationTest 테스트 케이스를 실행하였는데 강의와 다른 오류가 발생하였습니다!
오류 내용 - 중복_회원_예외()
java.lang.IllegalStateException: Failed to load ApplicationContext for [WebMergedContextConfiguration@709ed6f3 testClass = com.namu.namuspring.service.MemberServiceIntegrationTest, locations = [], classes = [com.namu.namuspring.NamuSpringApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@485966cc, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@7c711375, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6e0f5f7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@1e1a0406, org.springframework.boot.test.context.SpringBootTestAnnotation@793bd5d3], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]
오류 내용 - 회원가입()
java.lang.IllegalStateException: ApplicationContext failure threshold (1) exceeded: skipping repeated attempt to load context for [WebMergedContextConfiguration@709ed6f3 testClass = com.namu.namuspring.service.MemberServiceIntegrationTest, locations = [], classes = [com.namu.namuspring.NamuSpringApplication], contextInitializerClasses = [], activeProfiles = [], propertySourceDescriptors = [], propertySourceProperties = ["org.springframework.boot.test.context.SpringBootTestContextBootstrapper=true"], contextCustomizers = [org.springframework.boot.test.autoconfigure.actuate.observability.ObservabilityContextCustomizerFactory$DisableObservabilityContextCustomizer@1f, org.springframework.boot.test.autoconfigure.properties.PropertyMappingContextCustomizer@0, org.springframework.boot.test.autoconfigure.web.servlet.WebDriverContextCustomizer@485966cc, org.springframework.boot.test.context.filter.ExcludeFilterContextCustomizer@7c711375, org.springframework.boot.test.json.DuplicateJsonObjectContextCustomizerFactory$DuplicateJsonObjectContextCustomizer@6e0f5f7f, org.springframework.boot.test.mock.mockito.MockitoContextCustomizer@0, org.springframework.boot.test.web.client.TestRestTemplateContextCustomizer@1e1a0406, org.springframework.boot.test.context.SpringBootTestAnnotation@793bd5d3], resourceBasePath = "src/main/webapp", contextLoader = org.springframework.boot.test.context.SpringBootContextLoader, parent = null]

답변 1
0
안녕하세요. 김남욱님, 공식 서포터즈 OMG입니다.
화면 우측 상단의 코끼리모양 아이콘을 클릭하고 나서 다시 시도해보시겠어요?

동일한 문제가 발생하는 경우 아래 표시한 상위 테스트의 텍스트를 클릭한 오류 메시지 콘솔 내역을 복사하여 올려주시겠어요?
(현재 화면은 회원가입()을 클릭한 메시지만 확인됨)
감사합니다.
0
https://drive.google.com/file/d/1tCGTwMtU3DewnN72QsrOch5DFP-6uthL/view?usp=sharing
제가 인텔리제이를 꺼버려서 아이콘이 사라져버렸네요 ㅠ...
부트도 지금 안켜겨가지고 코드 링크로 올리겠습니다!
============================
CONDITIONS EVALUATION REPORT
============================
Positive matches:
-----------------
None
Negative matches:
-----------------
None
Exclusions:
-----------
None
Unconditional classes:
----------------------
None
0
강의를 수강하면서 h2 데이터베이스를 추가한 강좌를 학습하셨을거에요.
h2 데이터베이스를 사용한다면 스프링에도 관련된 설정을 적용하셔야 합니다.
강의 진행에 누락되거나, 강의와 다르게 작성한 부분을 짚어드릴테니 확인 후 수정하여 진행해주세요
(1) application.properties의 h2 설정 누락


(2) SpringConfig 내 생성자 누락
강의코드

첨부해주신 코드

(3) SpringConfig 클래스의 위치(강의진행에 문제는 없습니다)
강의 코드 위치

첨부해주신 코드 위치

1
차이점이 있는지 전반적으로 검토해주시고, MemoryMemberRepository를 사용하지 않고 Jdbc와 h2를 사용하는 시점부터는 h2가 실행중인 상태에서 강의 수강을 진행하셔야 합니다. 이부분도 참고하여주세요 😀
..
0
76
2
Unused property.....
0
102
2
project JDK is misconfigured
0
132
2
외부 API의 ID 타입(String/UUID)과 내부 도메인의 ID 타입(Long)이 불일치할 때의 설계 정석
0
83
2
단위/통합 테스트 버전충돌 문제
0
91
2
❗️springboot 4.0.2 버전 aspectj dependency 설정❗️
0
230
1
왜 컨트롤러는 변한게 없는데 새로 만든 html 파일이 뜨나요?
0
104
2
윈도우 build test오류 질문
1
103
2
테스트 관련 공부에 대한 조언을 얻고 싶습니다
0
101
2
테스트 실행 시 에러 질문
0
292
1
name을 통한 비교와 객체를 통한 비교
0
77
1
빌드 후 libs 없음
1
129
1
윈도우 gradlew.bat 에러
0
168
1
@PostMapping("/members/new")가 동작하지 않습니다
0
90
1
java static class와 kotlin class
0
79
1
스프링 DB연결
0
127
1
소요 시간
0
87
2
ddl.sql에 빨간 밑줄
1
102
2
welcome page 에러
0
183
3
잘 모르겠습니다.
0
164
2
fail을 똑같이 쳤는데 오류가 발생해요
0
157
2
index.html Welcome page
0
125
1
프로젝트 gradle-groovy ?
0
370
1
테스트코드 메서드명 한글
0
202
2





