springboot flowable 工作流

  1. 我们使用docker拉起一个mysql镜像
$ docker pull mysql
Using default tag: latest
latest: Pulling from library/mysql
6552179c3509: Pull complete 
d69aa66e4482: Pull complete 
3b19465b002b: Pull complete 
7b0d0cfe99a1: Pull complete 
9ccd5a5c8987: Pull complete 
2dab00d7d232: Pull complete 
64d3afdccd4a: Pull complete 
82148d50b16c: Pull complete 
8bb7d73a7d0c: Pull complete 
74778cd68a75: Pull complete 
d7e5f9309140: Pull complete 
f2e376ecd59f: Pull complete 
Digest: sha256:92d27b8222bbcf53bc42c70ca7cd1010d6c0527efc61f14980ce77c50932bef4
Status: Downloaded newer image for mysql:latest
docker.io/library/mysql:latest

$ docker run -p 3306:3306 --name mysql  -e MYSQL_ROOT_PASSWORD=123456 -d mysql:latest
52cbb34d7161301c69084d789415d9b9551c9928b0bdaac5e0463d4898ddc8b9

$ docker ps
CONTAINER ID   IMAGE          COMMAND                  CREATED         STATUS         PORTS                               NAMES
52cbb34d7161   mysql:latest   "docker-entrypoint.s…"   4 seconds ago   Up 3 seconds   0.0.0.0:3306->3306/tcp, 33060/tcp   mysql
  1. 进入容器内部创建数据库
$ docker exec -it 52cbb34d7161 /bin/bash
root@52cbb34d7161:/# pwd 
/
root@52cbb34d7161:/# ls
bin  boot  dev	docker-entrypoint-initdb.d  entrypoint.sh  etc	home  lib  lib64  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
root@52cbb34d7161:/# mysql -p123456
mysql: [Warning] Using a password on the command line interface can be insecure.
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 32
Server version: 8.0.28 MySQL Community Server - GPL

Copyright (c) 2000, 2022, Oracle and/or its affiliates.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> show databases;
+--------------------+
| Database           |
+--------------------+
| information_schema |
| mysql              |
| performance_schema |
| sys                |
+--------------------+
4 rows in set (0.00 sec)

mysql> create database flowable_demo;
Query OK, 1 row affected (0.03 sec)
  1. 我们使用spring boot cli来创建一个springboot项目,没有安装可以使用brew install spring-boot
$ spring init --dependencies=web,mysql springboot-flowable
Using service at https://start.spring.io
  1. 打开springboot-flowable项目新增 application.yml文件
spring:
  datasource:
    url: jdbc:mysql://localhost:3306/flowable_demo?useUnicode=true&characterEncoding=utf8
    username: root
    password: 123456
    driverClassName: com.mysql.cj.jdbc.Driver
flowable:
  async-executor-active: true
  1. pom坐标引入依赖jar包

     <dependency>
     	<groupId>org.flowable</groupId>
     	<artifactId>flowable-spring-boot-starter</artifactId>
     	<version>6.7.2</version>
     </dependency>
    
  2. 启动项目 从日志中就可以看到创建了响应的表和索引

2022-02-10 16:59:10.047  INFO 39580 --- [           main] liquibase.changelog                      : Foreign key constraint added to ACT_APP_DEPLOYMENT_RESOURCE (DEPLOYMENT_ID_)
2022-02-10 16:59:10.099  INFO 39580 --- [           main] liquibase.changelog                      : Index ACT_IDX_APP_RSRC_DPL created
2022-02-10 16:59:10.152  INFO 39580 --- [           main] liquibase.changelog                      : Table ACT_APP_APPDEF created
2022-02-10 16:59:10.260  INFO 39580 --
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

yanghaoyuan.sh

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值