您好,登錄后才能下訂單哦!
1:在 Visual Studio Code 中打開(kāi)擴(kuò)展視圖(Ctrl+Shift+X),輸入關(guān)鍵詞java、spring分別下載Java開(kāi)發(fā)插件包和springboot插件包
2:配置參數(shù) 點(diǎn)擊設(shè)置按鈕,進(jìn)入設(shè)置選項(xiàng),配置用戶設(shè)置(文件->首選項(xiàng)->設(shè)置 Ctrl+,)
{ "editor.minimap.enabled": false, "window.zoomLevel": 0, "workbench.iconTheme": "vscode-great-icons", "workbench.editor.enablePreview": false, "workbench.editor.enablePreviewFromQuickOpen": false, "editor.renderIndentGuides": false, "editor.highlightActiveIndentGuide": false, "java.home": "/usr/local/lib/jdk1.8.0_172", ###必需 "editor.fontSize": 15, "editor.lineHeight": 30, "maven.executable.path": "/usr/local/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:+UseG1GC -XX:+UseStringDeduplication", "explorer.confirmDelete": false }
3:新建項(xiàng)目:打開(kāi)命令窗口(Ctrl+Shift+P),輸入spring,接下來(lái)就是一步一步創(chuàng)建項(xiàng)目了
4:項(xiàng)目創(chuàng)建好以后,修改啟動(dòng)參數(shù)(調(diào)試->打開(kāi)配置文件 ->launch.json)中的主類,然后F5就可以運(yùn)行了
{ // 使用 IntelliSense 了解相關(guān)屬性。 // 懸停以查看現(xiàn)有屬性的描述。 // 欲了解更多信息,請(qǐng)?jiān)L問(wèn): 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" } ] }
然后F5就可以運(yùn)行了
以上就是本文的全部?jī)?nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持億速云。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。