系统安装jdk1.8,配置好环境变量JAVA_HOME,安装并配置好MAVEN_HOME
打开vscode,安装java相关插件
- Language support for Java ? for Visual Studio Code
- Java Extension Pack
- Debugger for Java
- Java Test Runner
- Tomcat for Java
-
Maven for Java
-
Project Manager
-
Chinese (Simplified) Language Pack for Visual Studio Code
-
Java Dependency Viewer
-
Spring Boot Extension Pack
-
XMLredhat.vscode-xml预览版
以上插件安装完成,就可以开始java开发了
个人推荐插件
- Eclipse Keymap for Visual Studio Code. (eclipse快捷键,eclipse用户最爱)
- Lombok Annotations Support for VS Code. (简化POJO, 很惊喜)
- Cloudfoundry Manifest YML Support
- Concourse CI Pipeline Editor
开发基本配置
常用配置项: 文件->首选项->设置
-
maven 配置(如果本地有安装maven) 编辑setting.json
{
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.configuration.checkProjectSettingsExclusions": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.renderControlCharacters": false,
"java.configuration.maven.userSettings": "C:\\Users\\pactera\\.m2\\settings.xml",
"files.exclude":{
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/.classpath":true,
"**/.project":true,
"**/.settings":true,
"**/.factorypath":true
},
"java.jdt.ls.vmargs": "-XX:+UseGlGC -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -Dsun.zip.disableMemoryMapping=true -Xmx1G -Xms100m",
"editor.renderIndentGuides": false,
"git.ignoreMissingGitWarning": true
}