Spring boot 如何为spring引导配置wait和maxAttempts属性:从Maven命令行开始

Spring boot 如何为spring引导配置wait和maxAttempts属性:从Maven命令行开始,spring-boot,spring-boot-maven-plugin,Spring Boot,Spring Boot Maven Plugin,我正在尝试配置一个管道,在这个管道中,我使用Maven命令运行Karate测试,以启动我的Spring引导应用程序,运行测试,然后停止应用程序。应用程序尝试启动,我可以看到它加载了一些配置,但是由于超时,生成错误 我使用的命令: mvn -Dspring-boot.run.jvmArguments="-Dspring.devtools.restart.enabled=false" compile spring-boot:start test -Dtest=KarateTest

我正在尝试配置一个管道,在这个管道中,我使用Maven命令运行Karate测试,以启动我的Spring引导应用程序,运行测试,然后停止应用程序。应用程序尝试启动,我可以看到它加载了一些配置,但是由于超时,生成错误

我使用的命令:

mvn -Dspring-boot.run.jvmArguments="-Dspring.devtools.restart.enabled=false" compile spring-boot:start test -Dtest=KarateTestRunner spring-boot:stop
这会导致一个错误

[ERROR] Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:2.3.9.RELEASE:start (default-cli) on project exampleProject: Could not figure out if the application has started: Failed to connect to MBean server at port 9001: Could not invoke shutdown operation: Spring application did not start before the configured timeout (30000ms 0>
根据文档,我尝试将以下参数添加到mvn命令

我还是犯了同样的错误。我显然没有提供正确的属性。如何从命令行设置spring boot:start目标的maxAttempts和wait属性

-Dspring-boot.start.maxAttempts=10 -Dspring-boot.start.wait=120000