下载springboot 源码
git clone https://gitee.com/mirrors/spring-boot.git
切换分支
git checkout -b v2.3.4.local v2.3.4.RELEASE
下载gradle
gradle-7.4.1-bin.zip
在.gradle 文件夹下面 建立init.gradle
def repoConfig = {
all {
ArtifactRepository repo ->
if(repo instanceof MavenArtifactRepository){
def url = repo.url.toString()
if(url.contains('repo1.maven.org/maven2')||url.contains('jcenter.bintray.com')||url.contains('plugins.gradle.org/m2')){
println "init.gradle:(${repo.name}:${repo.url})removed"
remove repo
}
}
}
mavenLocal()
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
allprojects{
buildscript{
repositories repoConfig
}
repositories repoConfig
}
开始构建
./gradlew testClasses
中途问题1
解决方法
手动复制了一份,名称改成了test
中途问题2
解决方法同上
再次构建,大功告成
可以开始开心撸源码了