개발(0)/Spring Boot
[IntelliJ]@Autowired 에러(Junit)
까만밀가루
2024. 5. 14. 16:15
Junit 테스트 시도 중 다음과 같이 @Autowired 에러가 떴다
Autowired members must be defined in valid Spring bean (@Component|@Service|..)
이때 Test 클래스에 @SpringBootTest 를 붙여주면 된다.