gradle idea sprongboot
更换为来源
https://start.aliyun.com
idea 指定版本
- 在gradle->wrapper->gradle-wrapper.properires
- distributionUrl 指定版本
指定 gradle jvm
- Preferences ->Build, Execution, Deployment ->Build Tools -> Gradle
- Gradle JVM
预览管理
- buld.gradle
- dependencies
加速镜像
- buld.gradle
repositories {
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
版本
- java8 不受 springboot3 支持
- java8 是oracle 最后一个免费版本 1.8.0.202
- grable https://services.gradle.org/distributions/gradle-6.8.1-bin.zip
- springboot
id 'org.springframework.boot' version '2.6.11'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
完整代码
plugins {
id 'org.springframework.boot' version '2.6.11'
id 'io.spring.dependency-management' version '1.0.13.RELEASE'
id 'java'
}
group = 'com.example'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '1.8'
repositories {
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/central' }
maven { url 'https://maven.aliyun.com/repository/gradle-plugin' }
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
}
test {
useJUnitPlatform()
}
gradle版本
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
本文来自博客园,作者:vx_guanchaoguo0,转载请注明原文链接:https://www.cnblogs.com/guanchaoguo/p/17056082.html