我正试图在spring-boot应用程序中作为servlet容器运行underflow,并遵循了我找到的所有关于它的说明,但从日志来看,tomcat似乎是web服务器。
这是日志:
21-03-17 00:15:45.481 INFO[,,][restartedMain]o.s.b.w.embedded.tomcat.TomcatWebServer:tomcat已初始化,端口:8080(http(
2021-03-17 00:15:45.489信息[,,][restartedMain]o.apache.catalina.core.StandardService:正在启动服务[Tomcat]
2021-03-17 00:15:45.489 INFO[,,][restartedMain]org.apache.catalina.core.StandardEngine:启动Servlet引擎:[apache Tomcat/9.043]
这是我的build.gradle文件:
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
}
请提供建议。我没什么主意了。
感谢
问题的原因取决于此:实现组:"net.rakugakibox.spring.boot",名称:"logback access spring boot starter",版本:"2.7.1">