# 扩展依赖库说明(2.16及以下版本)

扩展依赖库制作可以分成两部分:Java源码、usage.json。其中usage.json主要定义了该扩展依赖库下需要暴露给外部的逻辑、数据结构,而Java源码则是usage.json具体的实现。

目前扩展依赖库只支持逻辑和数据结构,因此暴露出来的逻辑(出入参)、数据结构(属性)必须满足低代码的要求。其他的则比较随意。

该文档适用于2.16及以下版本平台制作扩展依赖库,2.17及以上版本请参见扩展依赖库说明(2.17及以上版本)文档。

# 一、usage.json

该文件一般在doc目录下,以模块名命名,需要用户根据需求进行编辑,使usage.json中的定义和java源码保持一致。

以扩展依赖库math-tool为例,示例如下:

请点击此处展开查看
 
{
  "name" : "math-tool",//模块名,唯一标识
  "title" : "math工具模块",//模块标题
  "description" : "提供数学运算相关的方法,如add",//描述
  "specVersion" : "1.0.0",
  "type" : "module",//usage类型,默认为module
  "subType" : "extension",//usage子类型,默认为extension
  "version" : "1.0.3",//模块版本
  "externalDependencyMap" : {//模块依赖,目前只支持maven,为该扩展依赖库需要依赖的maven jar。
    "maven" : [ {
      "groupId" : "com.netease.lowcode",
      "artifactId" : "math-tool",
      "version" : "1.0.3"
    } ]
  },
  "structures" : [ {//数据结构定义
    "concept" : "Structure",
    "name" : "AddDTO",//数据结构名,唯一标识
    "description" : "",//数据结构描述
    "compilerInfoMap" : {//数据结构翻译信息,及该数据结构对应的packageName(Java),此处默认数据结构名和Class名需一致。
      "java" : {
        "packageName" : "com.netease.lowcode.math.tool.dto"
      }
    },
    "properties" : [ {//数据结构属性信息,此时AddDTO有两个属性,a(Integer)和b(Integer),另外属性类型结构和逻辑出入参类型结构时一致的。
      "concept" : "StructureProperty",
      "name" : "a",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    }, {
      "concept" : "StructureProperty",
      "name" : "b",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ]
  } ],
  "logics" : [ {//逻辑定义
    "concept" : "Logic",
    "name" : "covert",//逻辑名,唯一标识
    "description" : "",//逻辑描述
    "compilerInfoMap" : {//逻辑翻译信息,及该逻辑对应的packageName、className(Java),此处默认逻辑名和Java 方法名一致。
      "java" : {
        "className" : "CovertUtil",
        "packageName" : "com.netease.lowcode.math.tool.util"
      }
    },
    "params" : [ {//逻辑入参,即方法入参,若没有,可以不填
      "concept" : "Param",
      "name" : "intValue",//参数名称
      "description" : "",
      "typeAnnotation" : {//参数类型
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "String"
      }
    } ],
    "returns" : [ {//逻辑出参,即方法return,最多为一个,若没有,可以不填
      "concept" : "Return",
      "name" : "result",
      "description" : "",
      "typeAnnotation" : {//返回值类型
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ]
  }, {
    "concept" : "Logic",
    "name" : "empty",
    "description" : "",
    "compilerInfoMap" : {
      "java" : {
        "className" : "MathUtil",
        "packageName" : "com.netease.lowcode.math.tool.util"
      }
    },
    "params" : [ ],
    "returns" : [ ]
  }, {
    "concept" : "Logic",
    "name" : "add",
    "description" : "",
    "compilerInfoMap" : {
      "java" : {
        "className" : "MathUtil",
        "packageName" : "com.netease.lowcode.math.tool.util"
      }
    },
    "params" : [ {
      "concept" : "Param",
      "name" : "addDTO",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "reference",
        "typeNamespace" : "extensions.math-tool.structures",
        "typeName" : "AddDTO"
      }
    } ],
    "returns" : [ {
      "concept" : "Return",
      "name" : "result",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ]
  }, {
    "concept" : "Logic",
    "name" : "max",
    "description" : "",
    "compilerInfoMap" : {
      "java" : {
        "className" : "MathUtil",
        "packageName" : "com.netease.lowcode.math.tool.util"
      }
    },
    "params" : [ {
      "concept" : "Param",
      "name" : "a",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    }, {
      "concept" : "Param",
      "name" : "b",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ],
    "returns" : [ {
      "concept" : "Return",
      "name" : "result",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ]
  }, {
    "concept" : "Logic",
    "name" : "addAll",
    "description" : "",
    "compilerInfoMap" : {
      "java" : {
        "className" : "MathUtil",
        "packageName" : "com.netease.lowcode.math.tool.util"
      }
    },
    "params" : [ {
      "concept" : "Param",
      "name" : "numberList",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "generic",
        "typeNamespace" : "nasl.collection",
        "typeName" : "List",
        "typeArguments" : [ {
          "concept" : "TypeAnnotation",
          "typeKind" : "primitive",
          "typeNamespace" : "nasl.core",
          "typeName" : "Integer"
        } ]
      }
    } ],
    "returns" : [ {
      "concept" : "Return",
      "name" : "result",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "primitive",
        "typeNamespace" : "nasl.core",
        "typeName" : "Integer"
      }
    } ]
  } ]
}
  

# 二、制作说明

# 2.1 逻辑Logic

逻辑的Java实现方法必须是一个 静态方法,如Demo模块下存一个名为logic的逻辑。 则该逻辑的Java实现为

package com.netease.demo.util;

public class DemoUtil {
    public static void logic() {
        
    }
}
1
2
3
4
5
6
7

此时在usage.json对应的logic描述如下:

{
    "concept" : "Logic",
    "name" : "logic",
    "description" : "",
    "compilerInfoMap" : {
      "java" : {
        "className" : "MathUtil",
        "packageName" : "com.netease.demo.util"
      }
    },
    "params" : [ ],
    "returns" : [ ]
  }

1
2
3
4
5
6
7
8
9
10
11
12
13
14

# 2.2 逻辑入参Param

逻辑入参数量为0至多个

若名为logic下存在一个名为text的参数,类型为String,此时java代码如下:

package com.netease.demo.util;

public class DemoUtil {
    public static void logic(String text) {
        
    }
}
1
2
3
4
5
6
7

此时在usage.json对应的逻辑入参描述如下:

{
  "concept": "Logic",
  "name": "logic",
  "description": "",
  "compilerInfoMap": {
    "java": {
      "className": "DemoUtil",
      "packageName": "com.netease.demo.util"
    }
  },
  "params": [
    {
      "concept": "Param",
      "name": "text",
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "String"
      }
    }
  ],
  "returns": []
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# 2.3 逻辑出参Return

逻辑出参至多为一个,即不存在出参或者出参只有一个

若名为logic下存在出参,类型为Integer,此时java代码如下:

package com.netease.demo.util;

public class DemoUtil {
    public static Integer logic() {
        return 23;
    }
}
1
2
3
4
5
6
7

此时在usage.json对应的逻辑出参描述描述如下:

{
  "concept": "Logic",
  "name": "logic",
  "description": "",
  "compilerInfoMap": {
    "java": {
      "className": "DemoUtil",
      "packageName": "com.netease.demo.util"
    }
  },
  "params": [],
  "returns": [
    {
      "concept": "Return",
      "name": "result",
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Integer"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25

# 2.4 数据结构Structure

需要在usage.json中定义的数据结构(Structure)需要有以下要求

  1. 数据结构的Java实现Class中的成员必须是public。
  2. 数据结构需要实现Serializable接口。
  3. 成员需要有对应的get和Set方法。
  4. 数据结构必须有成员,否则无意义。

以下数据结构AddDTO为例。

package com.netease.lowcode.math.tool.dto;
import java.io.Serializable;
public class AddDTO implements Serializable {
    public int a;
    public int b;
    public int getA() {
        return a;
    }
    public void setA(int a) {
        this.a = a;
    }
    public int getB() {
        return b;
    }
    public void setB(int b) {
        this.b = b;
    }
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

其对应的usage.json描述如下:

{
  "concept": "Structure",
  "name": "AddDTO",
  "description": "",
  "compilerInfoMap": {
    "java": {
      "packageName": "com.netease.lowcode.math.tool.dto"
    }
  },
  "properties": [
    {
      "concept": "StructureProperty",
      "name": "a",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Integer"
      }
    },
    {
      "concept": "StructureProperty",
      "name": "b",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Integer"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32

# 2.5 参数类型type

参数类型包含了逻辑入参、逻辑出参以及数据结构的成员的类型。 一般来说usage.json中使用 typeKindtypeNamespacetypeName 来描述参数(逻辑入参、逻辑出参、数据结构成员)的类型。

  • typeKind:参数类型的种类 目前只支持三种类型:原始(primitive)、泛型(generic)、引用(reference)。
  • typeNamespace:参数类型的命名空间,一般为nasl.core,nasl.collection或当前的模块名(name)
  • typeName:参数类型的名称,如Integer(primitive种类)、List(generic种类)、AddDTO(reference种类)

下面将对原始(primitive)、泛型(generic)、引用(reference)这三种参数类型种类进行介绍

# 2.5.1 原始(primitive)

{
  "concept": "Param",//参数概念
  "name": "a",//参数名称
  "description": "",//参数描述
  "typeAnnotation": {
    "concept": "TypeAnnotation",//类型概念
    "typeKind": "primitive",//原始类型
    "typeNamespace": "nasl.core",//此时为nasl.core
    "typeName": "Integer"//类型
  }
}
1
2
3
4
5
6
7
8
9
10
11

其中原始(primitive)仅支持以下类型:Integer、Long、Double、String、Boolean、Date、Time、DateTime、Binary、Text。

上述类型中,对应的typaName(usage.json)和Java类型如下表所示

参数类型 名称 typename Java类型 备注
Integer 整数 Integer Integer、int
Long 长整数 Long Long、long
Double 小数 Double Double、double
String 字符串 String String
Boolean 布尔值 Boolean Boolean、boolean
Date 日期 Date java.time.LocalDate
Time 时间 Time java.time.LocalTime
DateTime 日期时间 DateTime java.time.ZonedDateTime
Text 长文本 Text String 长文本和字符串类型差异较小,属于低代码平台中的类型

以Date、Double为例,示例如下:

package com.netease.demo.util;

import java.time.LocalDate

public class DemoUtil {
    public static Double logic(LocalDate localDate) {
        return 3.4;
    }
}
1
2
3
4
5
6
7
8
9

对应的usage.json描述如下:

{
  "concept": "Logic",
  "name": "logic",
  "description": "",
  "compilerInfoMap": {
    "java": {
      "className": "logic",
      "packageName": "com.netease.demo.util"
    }
  },
  "params": [
    {
      "concept": "Param",
      "name": "localDate",
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Date"
      }
    }
  ],
  "returns": [
    {
      "concept": "Return",
      "name": "result",
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Double"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37

# 2.5.2 泛型(generic)

目前依赖库支持List与Map两种泛型

# 2.5.2.1 List
{
  "concept": "Logic",
  "name": "addAll",
  "description": "",
  "compilerInfoMap": {
    "java": {
      "className": "MathUtil",
      "packageName": "com.netease.lowcode.math.tool.util"
    }
  },
  "params": [
    {
      "concept": "Param",
      "name": "numberList",//参数名称
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "generic",//声明为泛型
        "typeNamespace": "nasl.collection",//如果为泛型的话,namespace为nasl.collection
        "typeName": "List",//list类型
        "typeArguments": [//泛型的具体类型,可以继续嵌套泛型
          {
            "concept": "TypeAnnotation",
            "typeKind": "primitive",
            "typeNamespace": "nasl.core",
            "typeName": "Integer"
          }
        ]
      }
    }
  ],
  "returns": [
    {
      "concept": "Return",
      "name": "result",
      "description": "",
      "typeAnnotation": {
        "concept": "TypeAnnotation",
        "typeKind": "primitive",
        "typeNamespace": "nasl.core",
        "typeName": "Integer"
      }
    }
  ]
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45

上述中对应的Java实现如下所示:

public class MathUtil {
    public static Integer addAll(List<Integer> numberList) {
        if (numberList == null) {
            return 0;
        }
        return numberList
                .stream()
                .filter(Objects::nonNull)
                .mapToInt(Integer::intValue)
                .sum();
    }
}
1
2
3
4
5
6
7
8
9
10
11
12

另外若表达 List<List<Integer>> 的usage.json格式如下:

{
      "concept" : "Param",
      "name" : "numberList",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "generic",
        "typeNamespace" : "nasl.collection",
        "typeName" : "List",
        "typeArguments" : [ {
          "concept" : "TypeAnnotation",
          "typeKind" : "generic",
          "typeNamespace" : "nasl.collection",
          "typeName" : "List",
          "typeArguments" : [ {
            "concept" : "TypeAnnotation",
            "typeKind" : "primitive",
            "typeNamespace" : "nasl.core",
            "typeName" : "Integer"
          } ]
        } ]
      }
    }
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23

# 2.5.3 引用(reference)

有时候参数(逻辑入参、出参、数据结构成员)类型可能是一个模块下另一个数据结构,那么就需要引用(reference)。

假设当前模块下存一个名为DemoDTO的数据结构,那么若像引用这个参数,则可以用以下json来描述

{
      "concept" : "Param",
      "name" : "XXX",
      "description" : "",
      "typeAnnotation" : {
        "concept" : "TypeAnnotation",
        "typeKind" : "reference",
        "typeNamespace" : "extensions.<模块名称>.structures",
        "typeName" : "DemoDTO"
      }
    }
1
2
3
4
5
6
7
8
9
10
11

# 2.6 其他注意事项

  • 名称规范

为尽可能减少由于重名导致的问题,在对模块、逻辑、数据结构进行命名时,尽可能采用和模块标识有关的名称,不要取通用的名字、如logic、add等等,尽量不要有名称冲突。

  • 扩展依赖库Java依赖规范

扩展依赖库在实际开发,很少只会有java8的依赖,肯定会使用其他java 依赖,如okhttp、freemarker、log4j2等。 但是在引如其他依赖,需要保证不会和应用默认的java依赖有冲突,尽量优先使用应用目前已有的Java依赖。

应用的java依赖树清单如下:

请点击此处展开查看
 
[INFO] +- org.apache.poi:poi:jar:4.1.2:compile
[INFO] |  +- commons-codec:commons-codec:jar:1.13:compile
[INFO] |  +- org.apache.commons:commons-collections4:jar:4.4:compile
[INFO] |  +- org.apache.commons:commons-math3:jar:3.6.1:compile
[INFO] |  \- com.zaxxer:SparseBitSet:jar:1.2:compile
[INFO] +- org.apache.poi:poi-ooxml:jar:4.1.2:compile
[INFO] |  +- org.apache.poi:poi-ooxml-schemas:jar:4.1.2:compile
[INFO] |  |  \- org.apache.xmlbeans:xmlbeans:jar:3.1.0:compile
[INFO] |  +- org.apache.commons:commons-compress:jar:1.19:compile
[INFO] |  \- com.github.virtuald:curvesapi:jar:1.06:compile
[INFO] +- javax.annotation:javax.annotation-api:jar:1.3.2:compile
[INFO] +- com.fasterxml.jackson.module:jackson-module-jaxb-annotations:jar:2.10.5:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-annotations:jar:2.10.5:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-core:jar:2.10.5:compile
[INFO] |  +- com.fasterxml.jackson.core:jackson-databind:jar:2.10.5:compile
[INFO] |  +- jakarta.xml.bind:jakarta.xml.bind-api:jar:2.3.3:compile
[INFO] |  \- jakarta.activation:jakarta.activation-api:jar:1.2.2:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-hibernate5:jar:2.10.5:compile
[INFO] |  \- javax.transaction:javax.transaction-api:jar:1.3:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-hppc:jar:2.10.5:compile
[INFO] |  \- com.carrotsearch:hppc:jar:0.8.1:compile
[INFO] +- com.fasterxml.jackson.datatype:jackson-datatype-jsr310:jar:2.10.5:compile
[INFO] +- com.h2database:h2:jar:1.4.200:compile
[INFO] +- io.springfox:springfox-boot-starter:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-data-rest:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-swagger-ui:jar:3.0.0:compile
[INFO] |  +- com.fasterxml:classmate:jar:1.5.1:compile
[INFO] |  +- org.slf4j:slf4j-api:jar:1.7.30:compile
[INFO] |  +- org.springframework.plugin:spring-plugin-core:jar:2.0.0.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-context:jar:5.2.8.RELEASE:compile
[INFO] |  \- org.springframework.plugin:spring-plugin-metadata:jar:2.0.0.RELEASE:compile
[INFO] +- io.springfox:springfox-oas:jar:3.0.0:compile
[INFO] |  +- io.swagger.core.v3:swagger-annotations:jar:2.1.2:compile
[INFO] |  +- io.swagger.core.v3:swagger-models:jar:2.1.2:compile
[INFO] |  +- io.springfox:springfox-spi:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-schema:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-core:jar:3.0.0:compile
[INFO] |  |  \- net.bytebuddy:byte-buddy:jar:1.10.13:compile
[INFO] |  +- io.springfox:springfox-spring-web:jar:3.0.0:compile
[INFO] |  |  \- io.github.classgraph:classgraph:jar:4.8.83:compile
[INFO] |  +- io.springfox:springfox-spring-webmvc:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-spring-webflux:jar:3.0.0:compile
[INFO] |  +- io.springfox:springfox-swagger-common:jar:3.0.0:compile
[INFO] |  \- org.mapstruct:mapstruct:jar:1.3.1.Final:runtime
[INFO] +- io.springfox:springfox-swagger2:jar:3.0.0:compile
[INFO] |  +- io.swagger:swagger-annotations:jar:1.5.20:compile
[INFO] |  \- io.swagger:swagger-models:jar:1.5.20:compile
[INFO] +- io.springfox:springfox-bean-validators:jar:3.0.0:compile
[INFO] +- com.zaxxer:HikariCP:jar:3.4.5:compile
[INFO] +- org.hibernate.validator:hibernate-validator:jar:6.0.20.Final:compile
[INFO] |  +- javax.validation:validation-api:jar:2.0.1.Final:compile
[INFO] |  \- org.jboss.logging:jboss-logging:jar:3.4.1.Final:compile
[INFO] +- org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.3.2:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter:jar:2.2.9.RELEASE:compile
[INFO] |  |  +- org.springframework.boot:spring-boot-autoconfigure:jar:2.2.9.RELEASE:compile
[INFO] |  |  +- jakarta.annotation:jakarta.annotation-api:jar:1.3.5:compile
[INFO] |  |  \- org.yaml:snakeyaml:jar:1.25:runtime
[INFO] |  +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.2.9.RELEASE:compile
[INFO] |  |  \- org.springframework:spring-jdbc:jar:5.2.8.RELEASE:compile
[INFO] |  +- org.mybatis.spring.boot:mybatis-spring-boot-autoconfigure:jar:1.3.2:compile
[INFO] |  +- org.mybatis:mybatis:jar:3.4.6:compile
[INFO] |  \- org.mybatis:mybatis-spring:jar:1.3.2:compile
[INFO] +- org.springframework.boot:spring-boot-configuration-processor:jar:2.2.9.RELEASE:provided
[INFO] +- org.springframework.boot:spring-boot-loader-tools:jar:2.2.9.RELEASE:compile
[INFO] |  \- org.springframework:spring-core:jar:5.2.8.RELEASE:compile
[INFO] |     \- org.springframework:spring-jcl:jar:5.2.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-actuator-autoconfigure:jar:2.2.9.RELEASE:compile
[INFO] |  |  \- org.springframework.boot:spring-boot-actuator:jar:2.2.9.RELEASE:compile
[INFO] |  \- io.micrometer:micrometer-core:jar:1.3.11:compile
[INFO] |     +- org.hdrhistogram:HdrHistogram:jar:2.1.11:compile
[INFO] |     \- org.latencyutils:LatencyUtils:jar:2.0.3:compile
[INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-aop:jar:5.2.8.RELEASE:compile
[INFO] |  \- org.aspectj:aspectjweaver:jar:1.9.6:compile
[INFO] +- org.springframework.boot:spring-boot-starter-log4j2:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.apache.logging.log4j:log4j-slf4j-impl:jar:2.12.1:compile
[INFO] |  |  \- org.apache.logging.log4j:log4j-api:jar:2.12.1:compile
[INFO] |  +- org.apache.logging.log4j:log4j-core:jar:2.12.1:compile
[INFO] |  +- org.apache.logging.log4j:log4j-jul:jar:2.12.1:compile
[INFO] |  \- org.slf4j:jul-to-slf4j:jar:1.7.30:compile
[INFO] +- org.springframework.boot:spring-boot-starter-mail:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-context-support:jar:5.2.8.RELEASE:compile
[INFO] |  \- com.sun.mail:jakarta.mail:jar:1.6.5:compile
[INFO] |     \- com.sun.activation:jakarta.activation:jar:1.2.2:compile
[INFO] +- org.springframework.boot:spring-boot-starter-web:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-json:jar:2.2.9.RELEASE:compile
[INFO] |  |  +- com.fasterxml.jackson.datatype:jackson-datatype-jdk8:jar:2.10.5:compile
[INFO] |  |  \- com.fasterxml.jackson.module:jackson-module-parameter-names:jar:2.10.5:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-tomcat:jar:2.2.9.RELEASE:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-core:jar:9.0.37:compile
[INFO] |  |  +- org.apache.tomcat.embed:tomcat-embed-el:jar:9.0.37:compile
[INFO] |  |  \- org.apache.tomcat.embed:tomcat-embed-websocket:jar:9.0.37:compile
[INFO] |  +- org.springframework.boot:spring-boot-starter-validation:jar:2.2.9.RELEASE:compile
[INFO] |  |  \- jakarta.validation:jakarta.validation-api:jar:2.0.2:compile
[INFO] |  +- org.springframework:spring-web:jar:5.2.8.RELEASE:compile
[INFO] |  \- org.springframework:spring-webmvc:jar:5.2.8.RELEASE:compile
[INFO] |     \- org.springframework:spring-expression:jar:5.2.8.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-test:jar:2.2.9.RELEASE:test
[INFO] |  +- org.springframework.boot:spring-boot-test-autoconfigure:jar:2.2.9.RELEASE:test
[INFO] |  +- com.jayway.jsonpath:json-path:jar:2.4.0:test
[INFO] |  |  \- net.minidev:json-smart:jar:2.3:test
[INFO] |  |     \- net.minidev:accessors-smart:jar:1.2:test
[INFO] |  |        \- org.ow2.asm:asm:jar:5.0.4:test
[INFO] |  +- org.junit.jupiter:junit-jupiter:jar:5.5.2:test
[INFO] |  +- org.mockito:mockito-junit-jupiter:jar:3.1.0:test
[INFO] |  |  \- org.junit.jupiter:junit-jupiter-api:jar:5.5.2:test
[INFO] |  |     +- org.apiguardian:apiguardian-api:jar:1.1.0:test
[INFO] |  |     +- org.opentest4j:opentest4j:jar:1.2.0:test
[INFO] |  |     \- org.junit.platform:junit-platform-commons:jar:1.5.2:test
[INFO] |  +- org.assertj:assertj-core:jar:3.13.2:test
[INFO] |  +- org.hamcrest:hamcrest:jar:2.1:test
[INFO] |  +- org.mockito:mockito-core:jar:3.1.0:test
[INFO] |  |  +- net.bytebuddy:byte-buddy-agent:jar:1.10.13:test
[INFO] |  |  \- org.objenesis:objenesis:jar:2.6:test
[INFO] |  +- org.skyscreamer:jsonassert:jar:1.5.0:test
[INFO] |  |  \- com.vaadin.external.google:android-json:jar:0.0.20131108.vaadin1:test
[INFO] |  +- org.springframework:spring-test:jar:5.2.8.RELEASE:test
[INFO] |  \- org.xmlunit:xmlunit-core:jar:2.6.4:test
[INFO] +- org.springframework.boot:spring-boot-test:jar:2.2.9.RELEASE:test
[INFO] |  \- org.springframework.boot:spring-boot:jar:2.2.9.RELEASE:compile
[INFO] +- org.springframework.boot:spring-boot-starter-quartz:jar:2.2.9.RELEASE:compile
[INFO] |  +- org.springframework:spring-tx:jar:5.2.8.RELEASE:compile
[INFO] |  \- org.quartz-scheduler:quartz:jar:2.3.2:compile
[INFO] |     \- com.mchange:mchange-commons-java:jar:0.2.15:compile
[INFO] +- org.apache.commons:commons-lang3:jar:3.9:compile
[INFO] +- commons-io:commons-io:jar:2.8.0:compile
[INFO] +- org.flowable:flowable-engine:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-bpmn-converter:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-bpmn-model:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-process-validation:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-image-generator:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-engine-common-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-engine-common:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  +- org.flowable:flowable-variable-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-event-registry-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-variable-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-identitylink-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-identitylink-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-entitylink-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-entitylink-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-event-registry:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  +- org.flowable:flowable-event-registry-model:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  +- org.flowable:flowable-event-registry-json-converter:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  +- org.flowable:flowable-eventsubscription-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  +- com.fasterxml.uuid:java-uuid-generator:jar:3.3.0:compile
[INFO] |  |  \- org.liquibase:liquibase-core:jar:3.8.9:compile
[INFO] |  |     \- javax.xml.bind:jaxb-api:jar:2.3.1:compile
[INFO] |  |        \- javax.activation:javax.activation-api:jar:1.2.0:compile
[INFO] |  +- org.flowable:flowable-event-registry-configurator:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-eventsubscription-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-task-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-task-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-job-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-job-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-batch-service:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-batch-service-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-idm-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-idm-engine:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- commons-logging:commons-logging:jar:1.2:compile
[INFO] |  +- org.flowable:flowable-idm-engine-configurator:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-cmmn-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-cmmn-model:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-dmn-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  |  \- org.flowable:flowable-dmn-model:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-form-model:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-form-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-content-api:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.flowable:flowable-http-common:jar:6.6.0-LOWCODE-1.1.0:compile
[INFO] |  +- org.apache.commons:commons-email:jar:1.5:compile
[INFO] |  |  \- com.sun.mail:javax.mail:jar:1.5.6:compile
[INFO] |  |     \- javax.activation:activation:jar:1.1:compile
[INFO] |  +- org.springframework:spring-beans:jar:5.2.8.RELEASE:compile
[INFO] |  +- joda-time:joda-time:jar:2.10.6:compile
[INFO] |  \- org.slf4j:jcl-over-slf4j:jar:1.7.30:compile
[INFO] +- mysql:mysql-connector-java:jar:8.0.16:compile
[INFO] +- com.oracle.database.jdbc:ojdbc8:jar:21.1.0.0:compile
[INFO] +- com.oracle.database.nls:orai18n:jar:21.1.0.0:compile
[INFO] \- com.dameng:DmJdbcDriver18:jar:8.1.2.79:compile
  
  • 目前扩展模若需要调用应用的系统接口时,建议通过http协议的方式调用,而不是直接用代码方式调用(暂时还不支持)。

# 三、扩展依赖库使用

若此时usage.json和Java源码已开发完成。

  1. 导出扩展依赖库jar

通过 mvn clean package -DskipTests 命令编译Java源码,导出扩展依赖库jar。

  1. 上传jar到maven仓库

可以通过在maven仓库的页面上手动操作,也可以直接mvn deploy方法直接将jar上传到maven仓库。

  1. 导入低代码平台

低代码平台 > 资产中心 > 租户资产 > 依赖库页面中点击手动上传,在选择当前扩展依赖库对应的usage.json文件,并点击确认。

  1. 引入扩展依赖库

进入低代码应用的可视化页面,点击依赖库管理 > 引入依赖库,选择需要引入的扩展依赖库,之后可以在全局逻辑和数据下,看到该依赖库。

  1. 使用扩展依赖库定义

之后扩展依赖库下的定义(逻辑、数据结构)与其他的使用方式一致,之后可以通过发布查看使用效果。

上次更新: 2023年06月26日