idea中导入的springboot项目依赖jar包下载不成功

今日在GitHub上下载了一个springboot项目来学习,但是导入的时候依赖的jar包一直无法下载,试了各种办法依旧不行,最后终于找到解决办法:
配置profiles
如图所示,右击项目点击下方的manven,右侧的profiles,下图是我已经配置好的,没有配置之前是create“profiles”,创建一个profiles
idea中导入的springboot项目依赖jar包下载不成功_第1张图片
创建完以后在其中添加如下标签:

 <profiles>
        <profile>
            <id>jdk‐1.8</id>
            <activation>
                <activeByDefault>true</activeByDefault>
                <jdk>1.8</jdk>
            </activation>
            <properties>
                <maven.compiler.source>1.8</maven.compiler.source>
                <maven.compiler.target>1.8</maven.compiler.target>
                <maven.compiler.compilerVersion>1.8</maven.compiler.compilerVersion>
            </properties>
        </profile>

idea中导入的springboot项目依赖jar包下载不成功_第2张图片
至此问题解决,依赖的各种jar包自动导入。

你可能感兴趣的:(idea中导入的springboot项目依赖jar包下载不成功)