Java&SpringBoot

내가 보려고 쓰는 IntelliJ 활용(단축키, Tip)

은line 2023. 2. 18. 04:22

단축키 변경 및 확인방법 [settings] keymap || ctrl+shift+A

esc : 누르면 커서 에디터창으로 

sout : System.out.println 자동완성

soutv : System.out.println (변수) 자동완성

변수명.soutv : System.out.println (변수) 자동완성

 

코드에서 검색 = ctrl + f 해당내용 변경 = ctrl + r

한줄 주석 = ctrl + /  여러줄 주석 = 주석 드래그 후 ctrl + shift + / 

들여쓰기 = [code] Auto indent Lines || ctrl+alt+i

코드 감싸기(조건문 or 반복문 or 예외처리문 등) = 코드 드래그 후 [code]  surround With || ctrl+alt+t

 

 

< spring파일 import >

zip파일 압축해제 후 인텔리 프로젝트 파일경로에 붙여넣기

open - maven file

Add configuration

- [Server 탭] new > tomcat Server > local 클릭 - name(Tomcat)> 서버위치(configure 클릭후 tomcat폴더 선택)

- [deployment 탭] Artifact추가 ~:war(압축 풀린채로 배포)클릭 > context칸에서 war지움 > ok

- 실행

 

# annotaiton WebServlet 인식x

  > [file] project Structure > Libraries > + Java > tomcat폴더의 lib 폴더 선택후 name지정