首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >一种带底流的弹簧靴

一种带底流的弹簧靴
EN

Stack Overflow用户
提问于 2021-03-17 06:24:56
回答 1查看 580关注 0票数 0

我试图在我的spring boot应用程序中以servlet容器的形式运行undertow,我遵循了我找到的关于它的所有说明,但从日志中看,tomcat似乎是web服务器。

这是日志:

21-03-17 00:15:45.481信息,,o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat初始化端口: 8080 (http)

2021-03-17 00:15:45.489 INFO,,o.apache.catalina.core.StandardService :启动Tomcat服务

2021-03-17 00:15:45.489信息,,org.apache.catalina.core.StandardEngine :启动Servlet引擎: Apache Tomcat/9.0.43

这是我的build.gradle文件:

代码语言:javascript
复制
plugins {
    id 'java'
    id 'org.springframework.boot' version '2.4.3'
    id 'io.spring.dependency-management' version '1.0.11.RELEASE'
    id 'jacoco'
    id "com.github.spotbugs" version "4.6.0"
    id "com.github.node-gradle.node" version "2.2.4"
}

jacoco {
    toolVersion = "0.8.6"
}
spotbugs {
    ignoreFailures = true
}
jacocoTestReport {
    reports {
        xml.enabled true
        csv.enabled true
        html.enabled true
    }
}
spotbugsMain {
    reports {
        html.enabled = true
        xml.enabled = true
    }
}
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

repositories {
    mavenLocal()
    mavenCentral()
}


sourceSets {
    componentTest {
        java {
            srcDir file('src/componentTest/java')
        }
        resources.srcDir file('src/componentTest/resources')
    }
}

configurations {
    componentTestCompile.extendsFrom testCompile
    componentTestRuntime.extendsFrom testRuntime
    developmentOnly
    runtimeClasspath {
        extendsFrom developmentOnly
    }

}
dependencyManagement {
    imports {
        mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2020.0.1'
    }
}

dependencies {
    implementation 'com.imperva:ms-spring-connector:1.2.6'
    implementation group: 'net.rakugakibox.spring.boot', name: 'logback-access-spring-boot-starter', version: '2.7.1'
    implementation 'org.springframework.boot:spring-boot-starter-actuator'
    compile("org.springframework.boot:spring-boot-starter-web") {
        exclude module: "spring-boot-starter-tomcat"
    }
    implementation group: 'org.springframework.boot', name: 'spring-boot-starter-undertow'
    implementation group: 'org.springframework.cloud', name: 'spring-cloud-starter-sleuth'
    implementation 'io.micrometer:micrometer-registry-prometheus'
    implementation 'io.micrometer:micrometer-core'



    compileOnly 'org.projectlombok:lombok:1.18.16'
    annotationProcessor 'org.projectlombok:lombok:1.18.16'

    developmentOnly 'org.springframework.boot:spring-boot-devtools'

    testImplementation('org.springframework.boot:spring-boot-starter-test') {
        exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
    }

    // Component Tests:
    componentTestImplementation 'org.junit.jupiter:junit-jupiter-api:5.4.2'
    componentTestImplementation group:   'com.imperva', name: 'jwt-generator', version: '1.4.0'
    componentTestRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.4.2'
    componentTestImplementation group: 'com.imperva', name: 'imperva-test-containers', 'version': '2.0.1'
    componentTestImplementation group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
    componentTestImplementation group: 'com.epam.reportportal', name: 'logger-java-logback', version: '4.0.0'
    componentTestImplementation 'com.epam.reportportal:agent-java-junit5:4.0.1'
    componentTestImplementation group: 'com.incapsula', name: 'jwt-utils', 'version': '3.3.1'
    componentTestImplementation group: 'com.google.code.gson', name: 'gson', version: '2.8.6'

}

task componentTest(type: Test) {
    testClassesDirs = sourceSets.componentTest.output.classesDirs
    classpath = sourceSets.componentTest.runtimeClasspath
    outputs.upToDateWhen { false }
    group = 'verification'
    useJUnitPlatform()
    systemProperty 'junit.jupiter.extensions.autodetection.enabled', true
}

test {
    useJUnitPlatform()
    finalizedBy jacocoTestReport
}

敬请指教。我满脑子都是点子。

谢谢

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2021-03-17 06:54:35

出现问题的原因是依赖关系:实现组:'net.rakugakibox.spring.boot',名称:'logback-access-spring-boot-starter',版本:'2.7.1‘

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/66664295

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档