IntelliJ auto import 충돌현상 해소하기

Sechan Beak·2023년 9월 5일
1

주로 ui 패키지 아래에 있는 Model을 임포트할 때, 충돌현상이 발생하여 자동으로 import가 안돼서 불편했다.

ch.qos.logback.core.model.Model
org.springframework.ui.Model

인텔리제이가 둘중 뭘 임포트할지 몰라서 결국 안해준다..

해결

  1. Editor > General > Auto Import
    "Add unambiguous imports on the fly" 옵션 활성화

  2. 아래 사진에서 "Exclude from auto-import and completion"에 배제를 원하는 클래스 경로를 추가해준다. img

그럼 자동으로 intelliJ가 해당 클래스를 제외하고 auto import candidate를 찾기때문에 자동으로 원하는게 임포트된다. 굳

profile
거사 하나 치르면 올림

0개의 댓글