springboot gradle 加速问题
初始化项目使用阿里云
- seriver url : https://start.spring.io
- 直接修改为: https://start.aliyun.com
关键的gradle
- 修改安装包地址 gradle-> wrapper-> gradle-wrapper.properties
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
greadle springboot 插件
buildscript {
repositories {
maven {
url 'https://maven.aliyun.com/repository/gradle-plugin'
}
}
dependencies {
classpath 'org.springframework.boot:spring-boot-gradle-plugin:2.4.1'
}
}
注意Gradle 和插件版关系
- org.springframework.boot:spring-boot-gradle-plugin:2.4.1
- io.spring.dependency-management' version '1.0.10.RELEASE'
meavn仓库地址修改
repositories {
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
maven { url 'https://maven.aliyun.com/repository/grails-core' }
maven { url 'https://maven.aliyun.com/repository/public' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
mavenCentral()
}
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/17174641.html