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

相关推荐
SamDeepThinking几秒前
秒杀系统需求PRD
java·后端·架构
一 乐11 分钟前
咖啡商城|基于springboot + vue咖啡商城系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·论文·毕设·咖啡商城系统
Royzst12 分钟前
String方法
java·开发语言
学习使我健康14 分钟前
Android 事件分发机制
android·java·前端
瀚高PG实验室25 分钟前
因磁盘IO性能低导致程序An I/O error 报错
java·jvm·数据库·瀚高数据库
好家伙VCC28 分钟前
**发散创新:基于FFmpeg的视频编码优化实践与实战代码解析**在现代多媒体系统中,
java·python·ffmpeg·音视频
SamDeepThinking28 分钟前
开篇词:6000万会员规模下,我们是怎么做秒杀系统的
java·后端·架构
程序员书虫43 分钟前
Spring 依赖注入一次讲透:`@Autowired`、`@Resource`、`@Qualifier`、`@Primary` 到底怎么选
java·后端·面试
Rsun045511 小时前
16、Java 迭代器模式从入门到实战
java·开发语言·迭代器模式
quan26311 小时前
20260416,日常开发-再记一次内存溢出
java·内存溢出·jprofile