打印/下载
JDK
VSCode

JavaJDK

# CentOS
dnf install java-latest-openjdk
# Archlinux
pacman -S java-openjdk jre-openjdk maven
  • 服务器只需安装Java环境

查看版本

java --version
javac --version
mvn -version

插件

  • Java Extension Pack
  • Maven for Java
  • Spring Boot Extension Pack

创建项目 ( ctrl+shift+p )

  • Spring Initializr: Generate a Maven Project
  • Spring Boot: 2.3.4
  • 语言: Java
  • Group Id: vip.webmis
  • 项目名称: java
  • 包类型: JAR
  • 依赖包:devTools(热更新)、web(集成tomcat)、Thymeleaf(模板引擎)

F5调试 ( launch.json )

{
  "version": "0.2.0",
  "configurations": [
    {
      "type": "java",
      "name": "Debug (Launch) - Current File",
      "request": "launch",
      "mainClass": "${file}"
    },
    {
      "type": "java",
      "name": "Debug (Launch)-JavaApplication<java>",
      "request": "launch",
      "mainClass": "vip.webmis.java.JavaApplication",
      "projectName": "java"
    }
  ]
}
{{copy}}