인프런 커뮤니티 질문&답변
레포지토리 검색을 못한다네요 ㅠㅠ
작성
·
6.7K
0
Service required a bean of type 'kr.edu.randi.mvc.repository.ArticleRepository' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
Action:
Consider defining a bean of type 'kr.edu.randi.mvc.repository.ArticleRepository' in your configuration.
@Autowired(required=true)를해봐도 안되네요...
아무리봐도 다른 곳이 없는데 ... 이상하네요 ㅠ
퀴즈
공통 설정값을 특정 클래스(@GlobalConfig 등)로 관리할 때 얻을 수 있는 주요 이점은 무엇일까요?
애플리케이션 성능이 비약적으로 향상된다
설정값 관리 및 변경이 용이해 유지보수성이 높아진다
DB 연결 없이 설정값 조회가 가능해진다
개발 환경과 운영 환경 간 설정 차이가 완전히 사라진다
답변 1
1
MybatisConfiguration 클래스에 아래 어노테이션이 적용되어있는지 확인해보시구요
@MapperScan(basePackages = "kr.edu.randi.mvc.repository")
ArticleRepository 클래스에 아래 어노테이션이 추가되어있는지 확인해보시기 바랍니다.
@Repository
예제로 완성된 샘플소스에서는 위에 2개가 들어가있는 상태에요





답변주셔서 감사합니다.
찾아봐도 해답이 안나오네요.... 다시 질문입니다... ㅠㅠ
https://pastebin.com/yi58nP7S
링크안에 소스코드가 있어서 혹시 필요하시면 참고해주세요
라이브러리 버전설정을 잘못한게 있어서 다시 한 번 해보겠습니다.