CodeSiri/ERROR

[SPRING ERROR] Injection of resource dependencies failed 발생| Mapper Error

Dev다D 2021. 5. 28. 18:01
반응형

01. 문제 발생

 spring 프로젝트 진행 중 server를 실행했는데 Injection of resource dependencies failed 발생

+ No setter found for property 'datasource' in class 'org.mybatis.spring.SqlSessionFactoryBean' 도 발생

 

02. 에러 메시지

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marketController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'marketService': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'marketDAO': Unsatisfied dependency expressed through field 'sqlSession'; nested exception is ....

 

03. 해결 과정

 너무 길어서 다 첨부할 수도 없는 길이의 error가 발생

+ marketController를 눈을 씻고 찾아봐도 에러를 찾을 수 없었는데 알고보니 Mapper에 오타

 

04. 해결 

 parameterType에서 "MemberDTO"가 "LoginDTO"로 오타가 있어서 고쳐봤더니 잘 돌아간다. 

반응형