freelec-springboot2-webservice
freelec-springboot2-webservice copied to clipboard
[오류] p.190 실행시 UnsatisfiedDependencyException 오류
기존에 올라온 질문이 아닌지 먼저 검색해주세요!
가장 자주 나온 제보
어떤 오류인가요?
오류설명: 제가 190p까지(구글로그인) 소스 작성해서 프로젝트를 실행하면 자꾸 아래와 같은 오류가 나면서 실행이 안됩니다. 해결해볼려고 진짜 이것저것 다해봤는데 도저히 안되서 글 남깁니다. 챗쥐한테 소스 다 쥐여줘도 해결못했는데 대체 뭐가문젠지 모르겠어요 ㅠㅠㅠㅠㅠ...
프로젝트 주소
Github에 오류가 난 프로젝트를 올려주세요.
Github 주소를 작성해주지 않으시면 답변해드릴수가 없어요!
- Github URL: https://github.com/yennie37/freelec-springboot2-webservice
오류 로그
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'securityConfig' defined in file [C:\Users\yenni\IdeaProjects\freelec-springboot2-webservice\build\classes\java\main\com\jojoldu\book\springboot\config\auth\SecurityConfig.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.jojoldu.book.springboot.config.auth.CustomOAuth2UserService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
어떤 오류인지 캡쳐해주세요.
기존에 올라온 오류질문들 답중에
책에서는 WebSecurityConfigurerAdapter를 상속받아 오버라이딩 방식으로 SecurityFilterChain을 등록하였습니다. 최근에는 WebSecurityConfigurerAdapter는 deprecated되어 사용하지 않으며, @bean으로 SecurityFilterChain을 등록합니다.
라는 답변을 발견했는데 이 문제같아서 서치해서 소스를 수정했는데, 이번엔 이런 jpa문제가 생겼네용.... ㅠ ㅎㅎ ㅜㅠ
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: JPA metamodel must not be empty!