第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

無法在 gradle.properties 中保留依賴項(xiàng)版本

無法在 gradle.properties 中保留依賴項(xiàng)版本

長(zhǎng)風(fēng)秋雁 2023-11-10 15:31:16
我需要在 gradle.properties 中保留依賴項(xiàng)的版本。gradle.properties:springBootVersion = '2.1.9.RELEASE'構(gòu)建.gradle:plugins {    id 'io.spring.dependency-management' version '1.0.8.RELEASE'    id 'org.springframework.boot' version '2.1.9.RELEASE'}subprojects {    repositories {        mavenCentral()    }    configurations.all {        resolutionStrategy {            failOnVersionConflict()        }    }    apply plugin: 'java'    apply plugin: 'io.spring.dependency-management'    dependencyManagement {        dependencies {            dependency "org.springframework.boot:spring-boot-starter-web:${springBootVersion}"            dependency "org.springframework.boot:spring-boot-starter-test:${springBootVersion}"        }    }    sourceCompatibility = 11    targetCompatibility = 11    tasks.withType(JavaCompile){        options.encoding = 'UTF-8'    }}設(shè)置.gradle:include 'api'api/build.gradle:apply plugin: 'org.springframework.boot'archivesBaseName = 'phone-gift-processing-api'dependencies {    implementation 'org.springframework.boot:spring-boot-starter-web'    testImplementation 'org.springframework.boot:spring-boot-starter-test'}輸出./gradlew clean build:> Task :api:compileJava FAILEDFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':api:compileJava'.> Could not resolve all files for configuration ':api:compileClasspath'.   > Could not find org.springframework.boot:spring-boot-starter-web:'2.1.9.RELEASE'.     Required by:         project :api即,Gradle 使用springBootVersion,但由于某種原因無法綁定依賴項(xiàng)。當(dāng)我替換${springBootVersion}為時(shí)${springBootVersion},構(gòu)建成功。
查看完整描述

1 回答

?
交互式愛情

TA貢獻(xiàn)1712條經(jīng)驗(yàn) 獲得超3個(gè)贊

你的格式有誤gradle.properties。而不是這個(gè):

springBootVersion = '2.1.9.RELEASE'

嘗試這個(gè):

springBootVersion=2.1.9.RELEASE

(空格是可選的,但重要的是值周圍不應(yīng)有引號(hào)。)


查看完整回答
反對(duì) 回復(fù) 2023-11-10
  • 1 回答
  • 0 關(guān)注
  • 136 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)