目录
第一步,修改nacos服务配置
>需注意<
第二步,pom.xml依赖包配置
Activiti的源码包解决之后,接下来就好做很多了
第一步,修改nacos服务配置
spring:
datasource:
url: jdbc:kingbase8://127.0.0.1:54321/progress?currentSchema=progress,productName=PostgreSQL,SYS_CATALOG,PUBLIC
username: root
password: 123456
driver-class-name: com.kingbase8.Driver
initialSize: 1
minIdle: 3
maxActive: 20
maxWait: 60000
timeBetweenEvictionRunsMillis: 60000
minEvictableIdleTimeMillis: 30000
testWhileIdle: false
testOnBorrow: false
testOnReturn: false
poolPreparedStatements: true
maxPoolPreparedStatementPerConnectionSize: 20
activiti:
database-type: postgres
database-schema: public
database-schema-update: none # 对所有表更新操作, 如不存在则创建
db-history-used: true # 使用历史表
history-level: full # 保存历史数据的最高级别
check-process-definitions: true # 校验流程文件
>需注意<
datasource中的url,currentSchema指定库名,productName指定语言PostgreSQL
activiti中database-schema指定模式是public还是其他,一般默认public
database-schema-update第一次可以使用true,服务器启动一次之后可以改为none
下图是人大金仓数据库管理工具看到的模式
如果模式选定有问题会有异常抛出
com.kingbase8.util.KSQLException: 错误: 创建中没有选择模式
其余配置项按实例配置既可
第二步,pom.xml依赖包配置
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.activiti.dependencies</groupId>
<artifactId>activiti-dependencies</artifactId>
<version>7.1.0.M6</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<!-- activiti -->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-image-generator</artifactId>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>7.1.0.M6</version>
</dependency>
<dependency>
<groupId>com.kingbase8</groupId>
<artifactId>kingbase8</artifactId>
<version>8.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>5.1.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-data</artifactId>
<version>5.1.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>5.1.7.RELEASE</version>
</dependency>
接下来启动服务器就ok啦