mvn spring-boot:run运行报错

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 (/Users/itkey/.m2/repository), public (https://maven.aliyun.com/repository/public), nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public)

解决办法

看起来你遇到了一个 Maven 插件未找到的问题。这可能是因为你的 Maven 配置中缺少了 Spring Boot 插件的定义。你可以尝试将 spring-boot-maven-plugin 添加到你的 Maven 配置中。

请确保在你的项目的 pom.xml 文件中添加以下内容:

xml 复制代码
<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>

添加了这个配置后,再次尝试运行 mvn spring-boot:run 命令,应该就可以成功编译和运行了。

相关推荐
计算机毕设指导61 分钟前
基于微信小程序的积分制零食自选平台【源码文末联系】
java·spring boot·mysql·微信小程序·小程序·tomcat·maven
神仙别闹3 分钟前
基于QT(C++)实现(图形界面)连连看
java·c++·qt
BioRunYiXue6 分钟前
双荧光素酶报告基因实验
java·运维·服务器·数据库·人工智能·数据挖掘·eclipse
Geoking.8 分钟前
深度理解 Java synchronized —— 从原理到实战
java·开发语言
未来影子19 分钟前
Java领域构建Agent新杀入一匹黑马(agentscope-java)
java·开发语言·python
goxingman23 分钟前
实体类上关于时间字符串和时间字段转换涉及注解分析
java·开发语言
QK芒果小洛31 分钟前
Springboot 接口校验数组中的对象的方式
java·spring boot·后端
AAA简单玩转程序设计33 分钟前
Java Map遍历的“优雅”合集
java·前端
qq_124987075335 分钟前
基于微信小程序的民宿预订系统的设计与实现(源码+论文+部署+安装)
java·spring boot·后端·微信小程序·毕业设计