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 命令,应该就可以成功编译和运行了。

相关推荐
胚芽鞘6811 小时前
关于java项目中maven的理解
java·数据库·maven
岁忧2 小时前
(LeetCode 面试经典 150 题 ) 11. 盛最多水的容器 (贪心+双指针)
java·c++·算法·leetcode·面试·go
CJi0NG2 小时前
【自用】JavaSE--算法、正则表达式、异常
java
Hellyc2 小时前
用户查询优惠券之缓存击穿
java·redis·缓存
今天又在摸鱼3 小时前
Maven
java·maven
老马啸西风3 小时前
maven 发布到中央仓库常用脚本-02
java·maven
代码的余温3 小时前
MyBatis集成Logback日志全攻略
java·tomcat·mybatis·logback
一只叫煤球的猫4 小时前
【🤣离谱整活】我写了一篇程序员掉进 Java 异世界的短篇小说
java·后端·程序员
斐波娜娜4 小时前
Maven详解
java·开发语言·maven
Bug退退退1234 小时前
RabbitMQ 高级特性之事务
java·分布式·spring·rabbitmq