今天新建一个springboot项目时,项目建好后,在IDEA下载依赖包时,下载了很久都没有下载完,后来仔细一看,是下载不了。
解决方法:
在项目的pom.xml文件上右键,弹出框中选择maven,再选择open 'settings.xml' 或者是 create 'settings.xml' ,操作如图:
在该文件中填入如下内容:
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<id>nexus<