Java 如何使用Gradle为反应式Spring Boot 2.0.0应用程序生成不可执行的war文件?

Java 如何使用Gradle为反应式Spring Boot 2.0.0应用程序生成不可执行的war文件?,java,tomcat,spring-boot,gradle,war,Java,Tomcat,Spring Boot,Gradle,War,我创建了SpringBoot2.0.0反应式Web应用程序。这是整个build.gradle文件 buildscript { ext { springBootVersion = '2.0.0.RELEASE' } repositories { mavenCentral() } dependencies { classpath("org.springframework.boot:spring-boot-g

我创建了SpringBoot2.0.0反应式Web应用程序。这是整个build.gradle文件

  buildscript {
    ext {
        springBootVersion = '2.0.0.RELEASE'
    }
    repositories {
        mavenCentral()

    }
    dependencies {
        classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
    }
}

apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'


group = 'myproj'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = 1.8

repositories {
    mavenCentral()
    maven { url "https://repo.spring.io/snapshot" }
    maven { url "https://repo.spring.io/milestone" }
}
    dependencies {
        compile('org.springframework.boot:spring-boot-starter-actuator')
        compile('org.springframework.boot:spring-boot-starter-cache')

        compile('org.springframework.boot:spring-boot-starter-data-mongodb-reactive')

        compile('org.springframework.boot:spring-boot-starter-thymeleaf')

        compile('org.springframework.boot:spring-boot-starter-webflux')

        runtime('org.springframework.boot:spring-boot-devtools')
        compileOnly('org.projectlombok:lombok')
        testCompile('org.springframework.boot:spring-boot-starter-test')

        testCompile('io.projectreactor:reactor-test')
        } 
它在使用嵌入式servlet容器的EclipseIDE下运行良好

这是主类的代码:

package mypackage;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class MyApplication {

    public static void main(String[] args) {
        SpringApplication.run(MyApplication.class, args);
    }
}
我有一个要求,我必须将这个反应式Spring启动应用程序作为war部署到Tomcat 8.5,因为它依赖于在同一Tomcat实例下运行的另一个传统的非反应式war应用程序。根据上述代码,这可能吗?如何实现


这是SpringBoot2.0.0反应式web应用程序,与Stackoverflow上看起来类似的问题不同

精确复制的不精确复制,有starter tomcat starter jetty deps,我没有这些deps,我的项目有Spring Reactive deps,这在tomcat下非常不同。