🌳 에러 코드
Description:
Field userBO in com.example.lesson04.Lesson04Ex01Controller required a bean of type 'com.example.lesson04.bo.UserBO' that could not be found.
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
2023-03-24 11:35:02,639 DEBUG [org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter] Application failed to start due to an exception
org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.example.lesson04.bo.UserBO' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
🌳 해결 방법
🌾 원인 : 어노테이션 안써서 생긴 문제.
🌾 해결 방법 : 각 페이지에 맞는 어노테이션 붙였는지 확인. 예)@Service 어노테이션을 쓰기.