惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

宝玉的分享
宝玉的分享
NISL@THU
NISL@THU
E
Exploit-DB.com RSS Feed
L
LINUX DO - 热门话题
L
Lohrmann on Cybersecurity
K
Kaspersky official blog
Project Zero
Project Zero
Cisco Talos Blog
Cisco Talos Blog
T
The Exploit Database - CXSecurity.com
P
Palo Alto Networks Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
T
Threatpost
S
Schneier on Security
G
GRAHAM CLULEY
The Hacker News
The Hacker News
T
Threat Research - Cisco Blogs
Scott Helme
Scott Helme
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy & Cybersecurity Law Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Cyberwarzone
Cyberwarzone
C
CERT Recently Published Vulnerability Notes
T
Tor Project blog
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
爱范儿
爱范儿
P
Privacy International News Feed
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
S
Securelist
G
Google Developers Blog
The Last Watchdog
The Last Watchdog
Google Online Security Blog
Google Online Security Blog
美团技术团队
F
Fortinet All Blogs
小众软件
小众软件
Recorded Future
Recorded Future
V
Visual Studio Blog
B
Blog RSS Feed
H
Help Net Security
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
Google DeepMind News
Google DeepMind News
Blog — PlanetScale
Blog — PlanetScale
博客园 - 聂微东
Stack Overflow Blog
Stack Overflow Blog
Martin Fowler
Martin Fowler
Latest news
Latest news
Spread Privacy
Spread Privacy
H
Heimdal Security Blog

博客园 - nuccch

在Cursor中读取飞书文档 使用GIMP去除水印的有效方法 在IDEA中配置注释模板 在Windows中使用Linux系统 树形层级结构的数据库表设计方案 如何理解和认识设计模式 申请Let's Encrypt免费HTTPS证书的方法 为GIT仓库项目设置独立配置参数 DBeaver设置不断开连接 构建工具Gradle入门实践 如何在Maven中排除依赖传递 87键键盘的数字键对应快捷键含义 关于Java JSON库的选择 解决mybatis批量更新慢问题 解决Spring Cloud Gateway中使用CompletableFuture.supplyAsync()执行Feign调用报错 Spring Boot框架中在Controller方法里获取Request和Response对象的2种方式 解读Spring Boot框架中不同位置抛出异常的处理流程 探究Spring Boot框架中访问不存在的接口时触发对error路径的访问 Spring Cloud工程中使用Nacos配置中心的2种方式 Swagger开启账号验证访问
如何基于VSCode打造Java开发环境
nuccch · 2026-03-14 · via 博客园 - nuccch

目前主流的AI编程工具,都是基于VSCode开发的(比如:CursorTraeKimi Code),针对已经习惯于使用其他IDE的用户而言,为了能方便地使用这些AI编程工具,需要知道如何基于VSCode打造Java开发环境,尽可能使得在VSCode中使用的效果跟在已经熟悉的IDE中保持一致,以提升开发效率。

在VSCode中的功能扩展几乎都是通过插件来实现,所以如下阐述几乎都是围绕各种插件进行说明。

快捷键插件

我个人已经习惯了Eclipse的快捷键,甚至在IDEA中都是安装的Eclipse快捷键插件,所以在VSCode需要安装插件:Eclipse Keymap

Java开发插件

  1. Language Support for Java(TM) by Red Hat:由 Red Hat 提供,负责代码补全、语法分析。
  2. Debugger for Java:调试支持。
  3. Maven for Java:项目管理。
  4. Test Runner for Java:单元测试运行。
  5. Spring Boot Extension Pack:如果使用 Spring Boot,该插件提供类似 IDEA 中强大的 Spring 专用工具窗口、代码导航和自动配置提示。
  6. Lombok Annotations Support for VS Code:如果项目中用了 Lombok,安装该插件避免代码报红。

Maven配置

如果需要自定义Maven相关配置,可以在settings.json文件中添加如下参数:

{
    "maven.excludedFolders": [
        "**/.*",
        "**/node_modules",
        "**/target",
        "**/bin",
        "**/archetype-resources"
    ],
    // Mavan路径
    "maven.executable.path": "D:\\sun\\apache-maven-3.9.8\\bin\\mvn.cmd",
    // Maven全局配置文件路径
    "maven.settingsFile": "D:\\sun\\apache-maven-3.9.8\\conf\\settings.xml",
    "maven.pomfile.autoUpdateEffectivePOM": true,
     // 更精细地控制Java导入行为
    "java.import.maven.enabled": true,
    "java.completion.enabled": true,
}