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

相关推荐
鹅城剑仙几秒前
Java线程池完全指南
java
李白的天不白3 分钟前
SmartAdmin(基于 Spring Boot 框架)中配置跨域请求 VUE3 设置请求头
java·前端
橙子进阶之路4 分钟前
Java线程(CompletableFuture)
java·开发语言
鹅城剑仙12 分钟前
Java CompletableFuture 异步编程完全指南
java
2601_9618752415 分钟前
法考备考计划表|学习计划|资料已整理
java·开发语言·学习·eclipse·tomcat·c#·hibernate
重生之我是Java开发战士26 分钟前
【Java SE】多线程(三):单例模式,阻塞队列,线程池与定时器
java·javascript·单例模式
AI人工智能+电脑小能手30 分钟前
【大白话说Java面试题 第115题】【并发篇】第15题:说一下悲观锁和乐观锁的区别?
java·开发语言·面试
心之伊始42 分钟前
Spring Boot Actuator + Micrometer 实战:自定义业务指标并接入 Prometheus 观测接口耗时
java·spring boot·prometheus·actuator·micrometer
Full Stack Developme1 小时前
Spring Integration 教程
java·后端·spring
摇滚侠1 小时前
MyBatis 入门到项目实战 MyBatis 分页插件 65-66
java·开发语言·sql·mybatis