gpt4 book ai didi

springdoc-openapi-ui - 无法在端口 9001 : Could not invoke shutdown operation: 连接到 MBean 服务器

转载 作者:行者123 更新时间:2023-12-04 13:54:33 31 4
gpt4 key购买 nike

在 mvn 全新安装时出错,尝试为 openAPI 规范生成 openapi.json
[错误] 无法执行目标 org.springframework.boot:spring-boot-maven-plugin:2.3.0.RELEASE:start (pre-integration-test) on project abcd: Cou
ld 无法确定应用程序是否已启动:无法在端口 9001 连接到 MBean 服务器:无法调用关闭操作:Spring 应用程序已启动
在配置的超时之前未启动(30000 毫秒 -> [帮助 1]
[错误]
[错误] 要查看错误的完整堆栈跟踪,请使用 -e 开关重新运行 Maven。
[错误] 使用 -X 开关重新运行 Maven 以启用完整的调试日志记录。
[错误]
[ERROR] 有关错误和可能的解决方案的更多信息,请阅读以下文章:
[错误] [帮助 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
使用以下配置 -

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.4.4</version>
</dependency>



<plugin>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-maven-plugin</artifactId>
<version>1.0</version>
<executions>
<execution>
<id>integration-test</id>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<apiDocsUrl>http://localhost:8080/v3/api-docs</apiDocsUrl>
<outputFileName>openapi.json</outputFileName>
<outputDir>${project.build.directory}</outputDir>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<mainClass></mainClass>
</configuration>
<executions>
<execution>
<id>pre-integration-test</id>
<goals>
<goal>start</goal>
</goals>
</execution>
<execution>
<id>post-integration-test</id>
<goals>
<goal>stop</goal>
</goals>
</execution>
</executions>
</plugin>

最佳答案

您没有使用正确的选项:

  • https://springdoc.org/#maven-plugin

  • 确保使用正确的 JVM 选项:
    -Dspring.application.admin.enabled=true

    关于springdoc-openapi-ui - 无法在端口 9001 : Could not invoke shutdown operation: 连接到 MBean 服务器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64779294/

    31 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com