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

相关推荐
TinyMemory4 小时前
Java 面向对象核心入门(七):方法重载 Overload,同一个方法名能干不一样的活
java·面向对象·overload·方法重载
吴声子夜歌4 小时前
Java扩展——OkHttp
java·开发语言·okhttp
卓怡学长4 小时前
w210基于springboot反诈平台设计与实现
java·spring boot·spring·intellij-idea
萧瑟余晖4 小时前
Java深入解析篇六十一之编译器API(javax.tools)详解
java·开发语言
码云数智-园园5 小时前
C++ STL 容器怎么选?vector、list、map、unordered_map 优缺点对比
java·开发语言
en.en..5 小时前
竖线 |:管道、按位或、掩码组合
java·开发语言
程序猿乐锅5 小时前
【计算机组成原理 | 第六章】中央处理器 CPU
java·开发语言
大模型丫丫5 小时前
如何提升单体 Spring Boot 应用的并发数?
java·spring boot·后端
Terra.K6 小时前
ThreadLocal解决一个线程里面跨层传递问题
java·开发语言·后端
泡海椒6 小时前
低代码规则开发:JQuick-Java声明式配置驱动开发落地教程
java·低代码·rxjava