1: Open the Extended view (ctrl+shift+x) in Visual Studio Code, enter the keywords Java, spring separately download the Java Development Plug-in package and the Springboot plug-in package
2: Configuration Parameters Click the Settings button, go to the Settings option, configure user settings (settings Ctrl + +, preferences, file)
{"editor.minimap.enabled": false, "Window.zoomlevel": 0, "Workbench.icontheme": "Vscode-great-icons", "Wo Rkbench.editor.enablePreview ": false," Workbench.editor.enablePreviewFromQuickOpen ": false," Editor.renderindentguides ": false," editor.highlightactiveindentguide ": false," Java.home ":"/usr/local/lib/jdk1.8. 0_172 ", # # #必需" editor.fontsize ":" Editor.lineheight ":" Maven.executable.path ":"/usr/loca L/bin/apache-maven-3.5.4/bin/mvn ", # # #必需 "Java.configuration.maven.userSettings":"/usr/local/bin/apache-maven-3.5.4/conf/settings.xml", # # #必需"MAVEN.TERMINAL.CUSTOMENV": [{ "Environmentvariable": "Java_home", # # #必需"value": "/usr/local/lib/jdk1.8.0_172" # # #必需}], "Terminal.integrated.shell.linux": "/bin/bash", "Java.jdt.ls.vmargs": "-noverify-xmx1g-xx:+use G1gc-xx:+usestringdeduplication "," Explorer.confirmdelete ": false}
3: New project: Open a Command Window (ctrl+shift+p), enter spring, then step by step to create the project
4: After the project is created, modify the main class in the Startup parameters (debug-open Profile->launch.json), and then F5 can run the
{ //use IntelliSense to understand related properties. //Hover to view the description of an existing property. //For more information, please visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ { "type": "java", "name": "Debug (Launch)-demoapplication<demo> " , " request ":" Launch ", " CWD ":" ${workspacefolder} ", " console ":" Internalconsole ", "Stoponentry": false, "MainClass": "Com.example.demo.DemoApplication", "args": "", " ProjectName ":" Demo " } ]}
And then F5 can run it.
End
Vscode Building a Java development environment