camunda_14_swagger

预编译软件包支持Swagger

命令行启动官方预编译, 缺省情况下就已经启动了 swagger ui.

PS C:\my_program\camunda-bpm-run-7.17.0> .\start.bat            
Setting JAVA property to "C:\Program Files\RedHat\java-1.8.0-openjdk-1.8.0.302-1\\bin\java"
REST API enabled
WebApps enabled
Swagger UI enabled
Invoice Example included - needs to be enabled in application configuration as well 

常用的地址是:

  • Camunda web : http://localhost:8080/camunda/
  • REST API: http://localhost:8080/engine-rest/
  • Swagger UI: http://localhost:8080/swaggerui/

Swagger UI 截图:
截图

应用系统内嵌流程引擎支持Swagger

内嵌流程引擎的应用系统, 要支持Swagger可参考预编译包额外做一些工作, 好在开源社区已经有人提供了简便的方案.
camunda-bpm-swagger开源项目地址

在pom.xml中引入 swagger ui 包和 camunda-bpm-swagger-json 包.

<dependencies>
	<dependency>
	  <groupId>org.webjars</groupId>
	  <artifactId>swagger-ui</artifactId>
	  <version>3.1.4</version>
	</dependency>
	  
	<dependency>
	  <groupId>org.camunda.bpm.extension.swagger</groupId>
	  <artifactId>camunda-bpm-swagger-json</artifactId>
	  <version>7.7.0</version>
	</dependency>
</dependencies>

在 pom.xml 增加 camunda-bpm-nexus 包源, 以便能拉取到 camunda-bpm-swagger-json 包.

  <repositories>
    <repository>
      <id>camunda-bpm-nexus</id>
      <name>camunda-bpm-nexus</name>
      <url>https://artifacts.camunda.com/artifactory/public/</url>
    </repository>
  </repositories>

访问如下网址, 即可进入 Swagger UI
http://localhost:8080/webjars/swagger-ui/3.1.4/index.html?docExpansion=none&url=/swagger.json

截图:
截图

posted @ 2022-10-08 07:18  harrychinese  阅读(353)  评论(0编辑  收藏  举报