[에러]Could not Autowired error

정태규·2023년 5월 10일
0

오류

목록 보기
2/2

인텔리제이 에서 Autowired를 쓰는데, class를 인식하지 못했다.
인터넷에 검색해보니 두가지가 방법이 나왔다.

    1. Help -> Edit Custom Properties
      아래 정보를 추가합니다.
      idea.spring.boot.filter.autoconfig=false
    1. 패키지내 아래와 같은 Configuration 을 추가하여 인텔리제이에게 인식시켜줍니다.
      @Configuration
      @ComponentScan({"@Autowired 대상이 있는 패키지"})

나는 첫번째 방법은 안됐고, 2번째 방법이 효과가 있었다.

0개의 댓글

Powered by GraphCDN, the GraphQL CDN