VScode

[vscode] java, springboot 개발환경 세팅

우주유령 2022. 7. 6. 21:38
728x90
반응형

1. vscode깔기

왠만하면 한국어 패치 하지 말기. 구글링하기 불편함
https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

 


2. extension깔기


extension pack for java ( + gradle for java 설치해도됨, 설치 안해도 gradle 빌드 됨)
spring boot tool
lombok
Native-ASCII converter (인코딩)
- .properties파일 인코딩 해줌

 

 

3. setting.json 설정


ctrl + shift + p 를 눌러서 setting.json에 들어가자

lombok 설정

lombok 사용을 위해 다음을 json에 추가하자

{
    //lombok사용
    "java.jdt.ls.vmargs": "-XX:+UseG1GC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m",
}

자동으로 설정되었을 수도 있다.

반드시 extension을 깐 다음에 설정을 넣어야 한다.

설정을 넣은 후 extension을 깔면 오류가 나니 조심하자!!

https://github.com/redhat-developer/vscode-java/issues/743

 

The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted. · Issue #743 · r

Receiving the following error when opening a Maven project folder: The Language Support for Java server crashed 5 times in the last 3 minutes. The server will not be restarted. Environment Operatin...

github.com

 

인코딩설정

Native-ASCII converter (인코딩) 는 .properties파일의 인코딩을 위해 필요하자. 아래 포스팅대로 세팅하자.

2022.07.20 - [VScode] - [vscode] app.properties 한글 깨짐, vsc인코딩 문제 해결, Native-ASCII converter

 

[vscode] app.properties 한글 깨짐, vsc인코딩 문제 해결, Native-ASCII converter

app.properties에서 한글이 깨지는 경우 인코딩이 잘못되서 발생하는 문제이다. 먼저 자동 인코딩을 켜두는 것이 좋다. 1. 자동인코딩 켜기 ctrl + shift + p를 눌러 settings.json에 들어가서 아래를 추가하

wouldyou.tistory.com

 

code formatter 설정

다른 코드 formatter를 설정한 경우 아래를 추가한다.

"[java]": {
    "editor.defaultFormatter": "redhat.java"
},

다음 포스팅을 참고하면 좋다.

https://wouldyou.tistory.com/76

 

[vscode] vue, java, spring, mybatis 개발환경 세팅

필수는 아니지만 추천하는 extension open in browser (alt + b로 html파일을 바로 브라우저에서 열 수 있음. 편함) material UI (아이콘을 예쁘게 바꿔줌) prettier (자동 코드정렬) 2022.07.06 - [VScode] - [..

wouldyou.tistory.com

 

728x90
반응형