解决的方法。
::::修改setting.xml文件,把mirror改成阿里的镜像。首先,先打开maven目录下的conf/setting.xml,注意要是idea使用的maven。接着是搜索;找到。在节点下添加。
<mirror>
<id>alimaven</id>
<name>aliyun maven</name>
<url>http://maven.aliyun.com/nexus/content/groups/public/</url>
<mirrorOf>central</mirrorOf>
</mirror>