강의

멘토링

커뮤니티

Inflearn Community Q&A

pulsmell2997's profile image
pulsmell2997

asked

Spring Core Principles - Basic Edition

Support for various configuration formats - Java code, XML

애러 질문이 있습니다.

Written on

·

743

0

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'orderService' defined in class path resource [appConfig.xml]: Cannot resolve reference to bean 'discountPolicy' while setting constructor argument; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'discountPolicy' available

이렇게 애러가 발생하네요,,
다시 코딩 해보면서 실수한거 없는지 살펴봤는데.. 잘 모르겠습니다 ㅠ_ㅠ

springoop

Answer 1

2

빈 id가 disCountPolicy인데 orderService bean의 constructor-arg는 discountPolicy를 참조하는 것 같습니다

Keith Cho님의 프로필 이미지
Keith Cho
Questioner

으악.. 감사합니다 ㅜ
가끔 이런 사소한 실수에 발목이 잡히네요 ㅎㅎ;
고맙습니다!

yh님의 프로필 이미지
yh
Instructor

크! 감사합니다.

pulsmell2997's profile image
pulsmell2997

asked

Ask a question