Welcome to the tech blog of Junior Backend Developer Myoungji Kim!
Development/Spring
[Error] Parameter 0 of constructor in service required a bean of type repository that could not be found.
-
📍 배경
Springboot + Kotlin + H2 조합으로 간단한 API 를 구축해보려고 했다.
📍이슈
Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-04-11T23:22:48.130+09:00 ERROR 38085 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 0 of constructor in com.example.application.member.MemberService required a bean of type 'com.topda.application.member.MemberRepository' that could not be found.
Action:
Consider defining a bean of type 'com.example.application.member.MemberRepository' in your configuration.
> Task :ApplicationKt.main() FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
Application Build 과정에서 계속 bean 관련 에러가 발생했다.
그러나 실질적으로 어노테이션으로 Bean을 주입해주어도 이슈는 해결되지 않았기에, 다른 곳에서 원인을 찾아봐야했다.
📍해결
R2DBC 종속성 제거하여 해결
처음에 spring.io에서 프로젝트 generate 시, 눈에 보이는 대로 이것저것 추가했으나..