在项目的pom中加入配置
<repositories>
<repository>
<id>public</id>
<name>Public Repositories</name>
<url>https://repo1.maven.org/maven2/</url>
</repository>
<repository>
<id>public2</id>
<name>Public Repositories</name>
<url>https://repo2.maven.org/maven2/</url>
</repository>
<repository>
<id>public3</id>
<name>Public Repositories</name>
<url>https://repo.maven.apache.org/maven2/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>public</id>
<name>Public Repositories</name>
<url>https://repo1.maven.org/maven2/</url>
</pluginRepository>
<pluginRepository>
<id>public2</id>
<name>Public Repositories</name>
<url>https://repo2.maven.org/maven2/</url>
</pluginRepository>
<pluginRepository>
<id>public3</id>
<name>Public Repositories</name>
<url>https://repo.maven.apache.org/maven2/</url>
</pluginRepository>
</pluginRepositories>