flowable-swagger

实现了 Flowable 整合 Swagger 的自动化配置项目

License

License

Categories

Categories

Swagger Program Interface REST Frameworks
GroupId

GroupId

io.github.markixy
ArtifactId

ArtifactId

flowable-swagger
Last Version

Last Version

1.0.2
Release Date

Release Date

Type

Type

jar
Description

Description

flowable-swagger
实现了 Flowable 整合 Swagger 的自动化配置项目
Project URL

Project URL

https://github.com/markixy/flowable-swagger
Source Code Management

Source Code Management

http://github.com/markixy/flowable-swagger/tree/master

Download flowable-swagger

How to add to project

<!-- https://jarcasting.com/artifacts/io.github.markixy/flowable-swagger/ -->
<dependency>
    <groupId>io.github.markixy</groupId>
    <artifactId>flowable-swagger</artifactId>
    <version>1.0.2</version>
</dependency>
// https://jarcasting.com/artifacts/io.github.markixy/flowable-swagger/
implementation 'io.github.markixy:flowable-swagger:1.0.2'
// https://jarcasting.com/artifacts/io.github.markixy/flowable-swagger/
implementation ("io.github.markixy:flowable-swagger:1.0.2")
'io.github.markixy:flowable-swagger:jar:1.0.2'
<dependency org="io.github.markixy" name="flowable-swagger" rev="1.0.2">
  <artifact name="flowable-swagger" type="jar" />
</dependency>
@Grapes(
@Grab(group='io.github.markixy', module='flowable-swagger', version='1.0.2')
)
libraryDependencies += "io.github.markixy" % "flowable-swagger" % "1.0.2"
[io.github.markixy/flowable-swagger "1.0.2"]

Dependencies

compile (9)

Group / Artifact Type Version
org.flowable : flowable-spring-boot-starter-rest Optional jar 6.6.0
org.flowable : flowable-spring-boot-starter-ui-idm Optional jar 6.6.0
org.flowable : flowable-spring-boot-starter-ui-modeler Optional jar 6.6.0
org.flowable : flowable-spring-boot-starter-ui-admin Optional jar 6.6.0
org.flowable : flowable-spring-boot-starter-ui-task Optional jar 6.6.0
org.springframework.boot : spring-boot-autoconfigure Optional jar
org.springframework.boot : spring-boot-configuration-processor Optional jar
io.springfox : springfox-swagger-ui jar 2.9.2
io.springfox : springfox-swagger2 jar 2.9.2

Project Modules

There are no modules declared in this project.

简介

该项目实现了 Flowable 整合 Swagger 的自动化配置。

实现

基本情况

  • 我们启动的应用为'主应用上下文';Flowable每个Rest模块都是一个独立的'子应用上下文'。
  • Swagger只能获取到'当前应用上下文'的接口信息,也就是说在'主应用上下文'启用的Swagger(@EnableSwagger2)无法获取到'子应用上下文'的接口信息。

实现思路

  • 在各个'子应用上下文'的扫描路径中添加配置类,启用Swagger;
  • 覆盖'主应用上下文'中的Swagger资源提供者(SwaggerResourcesProvider),聚合'子应用上下文'中的Swagger资源。

基础依赖

  • Swagger:2.9.2

配置

flowable:
  swagger:
    enabled: true #是否启用 Flowable 的 Swagger
    # 细粒度控制各模块的Swagger启用状态
    process.enabled: true
    idm.enabled: true
    cmmn.enabled: true
    content.enabled: true
    app.enabled: true
    form.enabled: true
    dmn.enabled: true
    event-registry.enabled: true
    external-job.enabled: true

flowable-ui:
  swagger:
    enabled: true #是否启用 Flowable UI 的 Swagger
    # 细粒度控制各App的Swagger启用状态
    admin.enabled: true
    idm.enabled: true
    idm-api.enabled: true
    modeler.enabled: true
    modeler-api.enabled: true

使用

  • pom.xml中引入依赖即可
<dependency>
    <groupId>io.github.markixy</groupId>
    <artifactId>flowable-swagger</artifactId>
    <version>1.0.2</version>
</dependency>

若重新打包则会更新到依赖版本,最新版本详见 https://search.maven.org/artifact/io.github.markixy/flowable-swagger

更新历史

change-log.md

Versions

Version
1.0.2
1.0.1
1.0.0