带有Spring webflux依赖性构建问题的Swagger

问题描述 投票:0回答:1

我与Kotlin Gradle项目合作。当我尝试整合摇摇欲坠时,它显示

无法解析io.springfox:springfox-swagger2:3.0.0-SNAPSHOT。可能的解决方案:-声明提供工件的存储库,请参阅位于

的文档

错误

  • springfox-swagger2:3.0.0-SNAPSHOT
  • springfox-swagger-ui:3.0.0-SNAPSHOT
  • springfox-spring-webflux:3.0.0-SNAPSHOT

在重新导入gradle项目时。

buildscript {
ext {
    kotlin_version = "1.2.51"
    springBootVersion = "2.0.3.RELEASE"

    junitPlatformVersion = '1.0.0-M2'
    junitJupiterVersion = '5.0.0-M2'
    junitVintageVersion = '4.12.0-M2'

    smack_version = '4.2.3'
}

repositories {
    mavenLocal()
    mavenCentral()
    maven { url "https://repo.spring.io/milestone" }
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/libs-snapshot" }
}
dependencies {
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    classpath "io.spring.gradle:dependency-management-plugin:1.0.3.RELEASE"
    classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlin_version}")

}

}

defaultTasks“ clean”,“ build”

子项目{

apply plugin: 'java'
apply plugin: 'kotlin'
apply plugin: 'kotlin-spring'

sourceCompatibility = 1.8

repositories {
    maven { url "https://repo.spring.io/libs-snapshot" }
    mavenLocal()
    mavenCentral()
    maven { url "http://archiva.hsenidmobile.com/repository/internal" }
    maven { url "https://repo.spring.io/milestone" }
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/libs-snapshot" }
    maven { url 'http://oss.jfrog.org/artifactory/oss-snapshot-local/' }
    jcenter()

}

dependencies {
    compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
    compile "org.jetbrains.kotlin:kotlin-reflect:$kotlin_version"

    compile("org.springframework.boot:spring-boot-starter-webflux:$springBootVersion") {
        exclude(module: "hibernate-validator")
    }

    compile("org.springframework.boot:spring-boot-starter-data-jpa:$springBootVersion")
    compile("org.springframework.boot:spring-boot-starter-security:$springBootVersion")
    compile("javax.servlet:javax.servlet-api:3.0.1")

    compile("io.jsonwebtoken:jjwt:0.7.0")

    compile("hms.common:hms-common-util:1.0.9")

    compile("com.fasterxml.jackson.module:jackson-module-kotlin:2.9.0.pr4")
    compile("com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.9.0.pr4")
    compile("org.postgresql:postgresql:42.1.4")
    compile("com.google.api-client:google-api-client:1.22.0")

    compile group: 'org.springframework.plugin', name: 'spring-plugin-core', version: '2.0.0.RELEASE'

    compile 'io.springfox:springfox-swagger2:3.0.0-SNAPSHOT'
    compile 'io.springfox:springfox-swagger-ui:3.0.0-SNAPSHOT'
    compile 'io.springfox:springfox-spring-webflux:3.0.0-SNAPSHOT'



    implementation "org.igniterealtime.smack:smack-tcp:$smack_version"
    implementation "org.igniterealtime.smack:smack-experimental:$smack_version"
    implementation "org.igniterealtime.smack:smack-java7:$smack_version"
    implementation "org.igniterealtime.smack:smack-extensions:$smack_version"
    implementation "org.igniterealtime.smack:smack-im:$smack_version"

    testCompile("org.junit.jupiter:junit-jupiter-api:${junitJupiterVersion}")
    testCompile("org.junit.platform:junit-platform-runner:${junitPlatformVersion}")
    testCompile("org.springframework.boot:spring-boot-starter-test:$springBootVersion")
    testCompile("io.projectreactor:reactor-test:3.1.0.RELEASE")

    runtime("tanukisoft:wrapper:3.2.3")

    testRuntime("org.junit.jupiter:junit-jupiter-engine:${junitJupiterVersion}")    //JUnit5
    testRuntime("org.junit.vintage:junit-vintage-engine:${junitVintageVersion}") //JUnit4

}

compileKotlin {
    kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
    kotlinOptions.jvmTarget = "1.8"
}

}

kotlin swagger-ui spring-webflux swagger-2.0 spring-boot-gradle-plugin
1个回答
0
投票

添加此存储库

    <repository>
        <id>jcenter-snapshots</id>
        <name>jcenter</name>
        <url>http://oss.jfrog.org/artifactory/oss-snapshot-local/</url>
    </repository>

这是Maven语法,但您可以轻松将其翻译为gradle

© www.soinside.com 2019 - 2024. All rights reserved.