当前位置: 首页 > 知识库问答 >
问题:

Spring Boot Dashboard不会在VSCode上显示应用程序

云慈
2023-03-14

我试图启动一个maven项目在视觉工作室代码,我运行mvn清洁安装命令来生成战争,一切都是正确的,但在Spring启动仪表板选项卡中,应用程序似乎无法启动它。

这是我的maven和java版本:

PS C:\Projects\PortalTimbrado> mvn -v
Apache Maven 3.6.2 (40f52333136460af0dc0d7232c0dc0bcf0d9e117; 2019-08-27T10:06:16-05:00)
Maven home: C:\Maven\bin\..
Java version: 1.8.0_251, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk1.8.0_251\jre
Default locale: es_MX, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows" 

我已经尝试了命令mvnSpring启动:运行,但失败了,这是输出:

[INFO] Scanning for projects...
Downloading from redhat-ga: https://maven.repository.redhat.com/ga/org/apache/maven/plugins/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading from redhat-ga: https://maven.repository.redhat.com/ga/org/codehaus/mojo/maven-metadata.xml
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded from redhat-ga: https://maven.repository.redhat.com/ga/org/apache/maven/plugins/maven-metadata.xml (2.5 kB at 1.9 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (14 kB at 9.5 kB/s)
Downloaded from redhat-ga: https://maven.repository.redhat.com/ga/org/codehaus/mojo/maven-metadata.xml (537 B at 368 B/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 kB at 14 kB/s)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  2.524 s
[INFO] Finished at: 2020-09-10T10:41:04-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (C:\Users\dlopezd\.m2\repository), redhat-ga (https://maven.repository.redhat.com/ga/), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException```


Please help me!

共有2个答案

傅啸
2023-03-14

来源:https://github.com/Microsoft/vscode-spring-boot-dashboard/issues/44

爱斯基摩评论15十月2018

我下载了你的项目并尝试了一下,但我无法重现这个问题。它首先像预期的那样坚持“导入项目”,因为语言服务器正在下载依赖项。而之后

你可以尝试以下步骤,但我不确定它是否能帮到你。

Close all your VSCode windows.
Open ~/.vscode/extensions folder, and remove folders with prefix like "redhat.java", "vscjava.vscode-spring-boot-dashboard", "vscjava.vscode-java-debug", "pivotal.vscode-spring-boot".
Open VSCode, install the spring boot dashboard extension from the marketplace.
Now try opening the project again, see if it works.
朱俭
2023-03-14

你确定有maven构建插件pom.xml

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>

    </plugins>
</build>

还要在pom中查看你的父母。xml

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>2.3.3.RELEASE</version>
    <relativePath/> <!-- lookup parent from repository -->
</parent>

然后重试mvn sping-start: run命令

 类似资料:
  • 所以几天前,我安装了vscode来处理Unity游戏引擎脚本,然而,即使我安装了C#扩展,它也不会显示每个函数的参数,例如,如果我编写一个函数,vscode没有显示我应该把什么样的参数放在括号里。我怎样才能让它这样做? 比如说,在我编写的代码中,它不会显示的参数: 此外,每当我从Unity项目加载脚本时,vscode都会显示此错误: 错误图像

  • 颤振医生-V: 我的操作系统是Ubuntu18.04,我想使用模拟器进行调试,请帮助我。

  • 我正在设置一个新的web应用程序,通过Application Insights登录。我已经安装了AI,并且看到了所有预期的遥测(服务器请求、失败的请求等),但没有通过ILogger发送日志。我已经看过所有类似的问题,我可以找到这样,但没有解决我的问题。 我正在使用。NET 5和2.17版。Microsoft的0(最新版本)。应用程序指示灯。AspNetCore-nuget包。连接字符串和检测键显示

  • 设置——我的Android应用程序在加载时调用REST API,从运行在Google app Engine上的服务器获取json提要。它解析这个json并填充一个包含ItemListBaseAdapter的列表。我正试图弄清楚它会从这里走向何方。 问题——当我通过USB在我的设备上构建和部署这个应用程序时,它像预期的那样工作。但是,当我从Playstore上传和下载这个应用程序时,我看到一个空白屏

  • banner.txt中定义的应用程序版本在运行应用程序时不会显示在控制台上。它是根据Spring Boot的文档定义的 该项目使用spring boot starter父级作为父级pom(从start.spring.io开始的基本项目设置)

  • 我在远程服务器上有一个git repo,并使用ssh和密码身份验证来克隆、拉、推。从命令行,一切正常。 但是在 vscode 中,当我尝试从远程存储库拉取或推送时,没有显示密码提示。Vscode似乎在等待什么,但什么也没发生。这是一个错误,还是我做错了什么? 我想在linux上使用visualstudio代码作为git客户端。 从命令行: 在vscode中: