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

相关推荐
C+-C资深大佬35 分钟前
Java 变量:从入门到精通
java·开发语言·python
Flittly1 小时前
【日常小问】Docker 部署 Nacos 2.4.3,Dubbo 3.3 连接 Config Service 失败排查
java·spring boot·dubbo
kuonyuma1 小时前
java之动态代理
java·开发语言
衔烛之龙11 小时前
Windows x64 构建 liboqs-java教程
java·windows·python
一路向北North1 小时前
Spring Security OAuth2.0(20):完善环境配置
java·后端·spring
Java面试题总结1 小时前
IntelliJ IDEA 从卡顿到起飞,只用改这些。。。
java·ide·intellij-idea
兰令水1 小时前
hot100【acm版】【2026.7.11/12打卡-java版本】
java·开发语言·数据结构·算法·职场和发展
Misnearch2 小时前
nacos配置管理改造
java·spring cloud·nacos
XWalnut2 小时前
LeetCode刷题 day29
java·算法·leetcode
4154112 小时前
MyBatis-Plus + PostGIS 实战(1.1):Geometry 字段在 Swagger 中的优雅展示
java·mybatis·postgis