先安装必要的插件

Vscode配置springboot开发环境变量

 

Vscode配置springboot开发环境变量

Vscode配置springboot开发环境变量

 

 然后在左下角setting 打开setting 配置setting.json文件 ,主要是配置了用户设置

这里面主要配置jdk环境和maven,建议下载vscode推荐的openjdk轻量

 

Vscode配置springboot开发环境变量

这个就是总体配置,下面贴出来代码


 

{
"terminal.integrated.shell.windows": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
"window.zoomLevel": 0,
"workbench.editor.enablePreview": false,
"editor.minimap.enabled": false,
"workbench.iconTheme": "vscode-great-icons",
"workbench.editor.enablePreviewFromQuickOpen": false,
"editor.renderIndentGuides": false,
"editor.highlightActiveIndentGuide": false,
"maven.executable.path": "D:\\SoftWare\\eclipse\\apache-maven-3.6.1\\bin\\mvn",
"java.configuration.maven.userSettings": "D:\\SoftWare\\eclipse\\apache-maven-3.6.1\\conf\\settings.xml",
"maven.terminal.customEnv": [
{
"environmentVariable": "JAVA_HOME",
"value": "C:\\Program Files\\Java\\jdk1.8.0_181"
}
],
"editor.suggestSelection": "first",
"vsintellicode.modify.editor.suggestSelection": "automaticallyOverrodeDefaultValue",
"java.jdt.ls.vmargs": "-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication",
"explorer.confirmDelete": false
}
 

里面jdk和maven的路径自己替换下,就可以愉快开发了

 

 

如果长时间间断使用vscode开发,我是同时把项目在eclipse下和vscode中一块使用,到后面会偶然的出现无法用vscode启动项目的问题:build fail 


百度了下,需要做一个类似eclipse中的maven clean 操作

参考地址:https://github.com/redhat-developer/vscode-java/wiki/Troubleshooting#clean-the-workspace-directory

 

在vscode界面 ctril+shift+p 或者F1   输入java:clean选中后右下角选择restart and delete 重启后就好了

 

相关文章:

  • 2021-04-05
  • 2021-09-24
  • 2021-09-26
  • 2021-12-19
  • 2021-10-19
  • 2021-06-10
  • 2021-04-26
猜你喜欢
  • 2022-01-22
  • 2021-06-03
  • 2022-12-23
  • 2022-01-20
  • 2021-11-07
  • 2021-11-19
  • 2021-12-17
相关资源
相似解决方案