SpringBoot spring-boot-starter-web-services和spring-boot-starter-webflux中断DSL路由

问题描述

我正在使用Spring Boot和带有Kotlin的webflux(反应式)启动一个项目。我调查了这个博客https://kotlinexpertise.com/spring-webflux-with-kotlin-reactive-web/,该示例效果很好。该应用程序在Netty上运行。依赖项是:

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-webflux")
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
    implementation("org.jetbrains.kotlin:kotlin-reflect")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
    testImplementation("org.springframework.boot:spring-boot-starter-test") {
        exclude(group = "org.junit.vintage",module = "junit-vintage-engine")
    }
    testImplementation("io.projectreactor:reactor-test")
}

现在,我需要使用org.springframework.boot:spring-boot-starter-web-services,因为我有一个依赖于SOAP Webservice的存储库。仅通过添加此依赖项,应用程序即可在Tomcat上运行,并且路由配置不再起作用(我在请求http:// localhost:8080 / reactive时得到404)。对于春天来说,这是一个非常新的事物,但是据我从https://www.baeldung.com/spring-webflux-concurrency#reactive_programming_with_spring_webflux的了解来看,这应该仍然有效。依赖项是

dependencies {
    implementation("org.springframework.boot:spring-boot-starter-web-services")
    implementation("org.springframework.boot:spring-boot-starter-webflux")
    implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
    implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
    implementation("org.jetbrains.kotlin:kotlin-reflect")
    implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
    implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
    testImplementation("org.springframework.boot:spring-boot-starter-test") {
        exclude(group = "org.junit.vintage",module = "junit-vintage-engine")
    }
    testImplementation("io.projectreactor:reactor-test")
}

我想念什么?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)