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 (C:\Users\12\.m2\repository), public (https://maven.aliyun.com/repository/public), central (https://repo.maven.apache.org/maven2)] -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException Disconnected from the target VM, address: '127.0.0.1:50675', transport: 'socket'
时间: 2024-04-27 22:24:27 浏览: 98
这个错误通常是由于 Maven 没有正确加载 Spring Boot 插件导致的。你可以尝试以下步骤:
1. 确认你的 Maven 版本是否支持 Spring Boot 插件。Spring Boot 2.4.x 版本需要 Maven 3.6.0 或更高版本才能正常工作。
2. 确认你的 Maven 配置文件(settings.xml)是否正确配置了镜像和仓库。可以参考以下配置:
```xml
<mirrors>
<mirror>
<id>aliyun</id>
<mirrorOf>*</mirrorOf>
<name>阿里云公共仓库</name>
<url>https://maven.aliyun.com/repository/public</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>default</id>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
```
3. 确认你的 pom.xml 文件是否正确引入了 Spring Boot 插件。可以参考以下配置:
```xml
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>2.4.4</version>
</plugin>
</plugins>
</build>
```
希望这些步骤可以帮助你解决问题!
阅读全文