如何在Spring Boot Gradle中指定启动器?

如何在Spring Boot Gradle中指定启动器?,gradle,spring-boot,launcher,Gradle,Spring Boot,Launcher,SpringBoot中有三个启动器:JarLauncher/PropertiesLauncher/WarLauncher。 对于可执行jar,默认情况下将使用JarLauncher。现在我想改用PropertiesLauncher,这样我就可以使用外部类路径了。我如何指定这是SpringBootGradle插件 根据此文档的D3.1,我可以在MANIFEST.MF中指定主类,如下所示: Main-Class: org.springframework.boot.loader.JarLauncher

SpringBoot中有三个启动器:JarLauncher/PropertiesLauncher/WarLauncher。 对于可执行jar,默认情况下将使用JarLauncher。现在我想改用PropertiesLauncher,这样我就可以使用外部类路径了。我如何指定这是SpringBootGradle插件

根据此文档的D3.1,我可以在MANIFEST.MF中指定主类,如下所示:

Main-Class: org.springframework.boot.loader.JarLauncher
Start-Class: com.mycompany.project.MyApplication
但是,在Spring Boot Gradle中,以下代码段实际上指定了开始类,而不是主类:

springBoot {
    mainClass = "com.sybercare.HealthServiceApplication"
}
我需要手动创建MANIFIEST.MF吗?还是有更好的方法


谢谢

添加
布局
属性:

springBoot{
    mainClass = "com.sybercare.HealthServiceApplication"
    layout = "ZIP"
}

layout=ZIP
触发SpringBoot使用
PropertiesLauncher
布局属性默认为基于归档类型(jar或war)的猜测。对于PropertiesLauncher,布局为ZIP(即使输出可能是jar文件)


非常感谢@pczeus。我一直在寻找这个解决方案,但很难找到。你在哪里找到的文件?