springboot gradle 加速问题

初始化项目使用阿里云

关键的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()
}
posted @ 2023-03-03 10:18  vx_guanchaoguo0  阅读(68)  评论(0编辑  收藏  举报