亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

春云版本變更后,無法構建標準Jar

春云版本變更后,無法構建標準Jar

嗶嗶one 2022-09-07 16:56:30
我./build.gradleplugins {//  id 'org.springframework.boot' version '2.1.4.BUILD-SNAPSHOT'    id 'org.springframework.boot' version '1.5.9.RELEASE'    id 'java'}apply plugin: 'io.spring.dependency-management'group = 'com.yd.spring'version = '1.0.0'sourceCompatibility = '1.8'repositories {    mavenCentral()    maven { url 'https://repo.spring.io/snapshot' }    maven { url 'https://repo.spring.io/milestone' }}ext {//  set('springCloudVersion', 'Greenwich.BUILD-SNAPSHOT')    set('springCloudVersion', 'Edgware.SR2')}dependencies {    implementation 'com.google.code.gson:gson'    implementation 'redis.clients:jedis'    implementation 'org.springframework.boot:spring-boot-starter-actuator'    implementation 'org.springframework.boot:spring-boot-starter-web'    runtimeOnly 'mysql:mysql-connector-java'    implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.0'    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'    implementation 'org.springframework.cloud:spring-cloud-starter-netflix-zuul'    implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'    testImplementation 'org.springframework.boot:spring-boot-starter-test'}dependencyManagement {    imports {        mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"    }}注釋代碼是依賴項的版本,然后是之前的版本更改。當改變后,我的想法可以成功運行項目但是當我構建一個Jar使用命令時./gradlew clean build
查看完整描述

1 回答

?
GCT1015

TA貢獻1827條經驗 獲得超4個贊

您正在混合版本。對于格林威治發布列車,您需要使用 Boot 2.1.x。您使用的依賴項很可能是使用 Boot 2.0。因此,一般來說,您需要處理的版本不匹配。implementation 'org.mybatis.spring.boot:mybatis-spring-boot-starter:2.0.0'

您可以在網站 https://spring.io/projects/spring-cloud#overview“發布列車”部分下查看發布版本和引導版本兼容性表。


查看完整回答
反對 回復 2022-09-07
  • 1 回答
  • 0 關注
  • 82 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號