본문 바로가기
Backend/Spring Boot

인텔리제이 단축키 모음

by 이은선 2024. 1. 6.
728x90
SMALL

command + p : parameter 정보

command + shift + enter : 인텔리제이에서 알아서 문장 완성해줌.

control + enter : 자바 생성자 / getter / setter

option + enter : 자바 인터페이스를 구현체로 만들 때 인터페이스의 method를 불러올 수 있음. / static class로 import 해줌. / 람다 함수로 바꿔줌

shift + f : rename시 편리, 변수 이름 하나 바꾸면 해당 변수의 이름을 전체 다 바꿔줌.

command + option + v : 리턴 type과 리턴명 알아서 지정 해줌.

control + t : 리팩토링 관련된 여러 기능 제공, finder에서 method 검색 후  8.extract method클릭하면 메소드로 추출 가능 (command + option + m)

(해당 class에서) command + shift + t : 해당 class와 관련된 test.java 파일 틀 생성해줌. 

control + r : 이전에 실행했던 걸 그대로 실행해줌.

command + o : 파일 손쉽게 검색하여 찾을 수 있음.

command + e : 가장 최근에 봤던 파일로 이동

command + option + n : 아래처럼 리턴하는 값이 똑같을 때 inline 문장으로 바꿔줌. (control + t : inline 검색해도 나옴)

List<Member> result = em.createQuery("select m from Member m", Member.class) // JPQL 
        .getResultList();
return result;
return em.createQuery("select m from Member m", Member.class) // JPQL
                .getResultList();

 

F2 : 오류난 곳으로 바로 이동 가능

command + shift + t : 해당 메소드에서 바로 junit test 생성 가능 

iter : 리스트나 배열에서 iteration 완성해줌.

soutv : System.out.println("변수명 = " + 변수명); 출력

shift 두번 : 해당 코드가 쓰여진 파일 등을 찾을 수 있음

command + option + b : 인터페이스에서 누르면 바로 구현체로 들어갈 수 있음. (구현체가 여러개인 경우 선택 가능)

command + r : 코드 replace 가능

command + shift + r (디렉토리에서) : 하위 파일들에서 모두 코드 replace 가능

command + p : 스프링이 제공하는 함수/class의 필요 인자 볼 수 있음.

shift + F6 : 함수 내에서 변수 등 Rename 가능

control + o : interface 상속 받을시 override/implement할 메소드를 고를 수 있음.

command + shift + f : 전체 파일에서 코드로 해당 파일을 찾을 수 있음.

commaNd + option + p : 함수에서 변수를 parameter로 꺼낼 수 있음.

728x90
LIST