首先從gitee那邊創(chuàng)建一個項目拉取github那邊的源碼, 不然下載速度會低的你懷疑人生
然后使用IDEA打開, 這時候你還沒有gradle
去C:\Users\User.gradle\wrapper\dists里面有你需要下載的gradle版本
然后用某不知名工具去<meta charset="utf-8">
https://services.gradle.org/distributions/ 下載gradle,獲取下載地址以后推薦使用迅雷下載, 速度挺快
然后放到
C:\Users\User.gradle\wrapper\dists相關目錄下
然后在.gradle根目錄下創(chuàng)建兩個文件
init.gradle :
allprojects {
repositories {
// 這里是你本地maven倉庫文件地址
maven { url 'file:///C:/Users/10235/.m2/repository'}
mavenLocal()
maven { name "Alibaba" ; url "https://maven.aliyun.com/repository/public" }
maven {
url 'https://maven.aliyun.com/repository/spring/'
}
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
mavenCentral()
}
buildscript {
repositories {
maven { name "Alibaba" ; url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'https://maven.aliyun.com/nexus/content/groups/public' }
maven { url 'https://maven.aliyun.com/nexus/content/repositories/jcenter'}
maven { name "M2" ; url 'https://plugins.gradle.org/m2/' }
}
}
}
gradle.properties:
systemProp.http.proxyHost=127.0.0.1
systemProp.http.proxyPort=10809
systemProp.https.proxyHost=127.0.0.1
systemProp.https.proxyPort=10809
這個文件是用于fq, 這里的端口是你不知名軟件的端口
然后就可以開心的Spring項目里的import-into-idea.md步驟完成相關操作了