flowable 项目的Pom.xml
pom.xml
<?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.3.5.RELEASE</version> <relativePath/> <!-- lookup parent from repository --> </parent> <groupId>com.learn</groupId> <artifactId>flowable-01</artifactId> <version>0.0.1-SNAPSHOT</version> <name>flowable-01</name> <description>Demo project for Spring Boot</description> <properties> <java.version>8</java.version> <org.flowable.version>6.7.1</org.flowable.version> <flowable.version>6.7.1</flowable.version> </properties> <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>8.0.11</version> </dependency> <!--<dependency>--> <!--<groupId>com.mysql</groupId>--> <!--<artifactId>mysql-connector-j</artifactId>--> <!--<scope>runtime</scope>--> <!--</dependency>--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> <scope>test</scope> </dependency> <!--lombok --> <dependency> <groupId>org.projectlombok</groupId> <artifactId>lombok</artifactId> <version>1.18.22</version> </dependency> <!-- idm依赖提供身份认证 --> <!--<dependency>--> <!--<groupId>org.flowable</groupId>--> <!--<artifactId>flowable-spring-boot-starter-ui-idm</artifactId>--> <!--<version>${org.flowable.version}</version>--> <!--</dependency>--> <!-- modeler绘制流程图 --> <!--<dependency>--> <!--<groupId>org.flowable</groupId>--> <!--<artifactId>flowable-spring-boot-starter-ui-modeler</artifactId>--> <!--<version>${org.flowable.version}</version>--> <!--</dependency>--> <!-- jpa --> <!--<dependency>--> <!--<groupId>org.springframework.boot</groupId>--> <!--<artifactId>spring-boot-starter-data-jpa</artifactId>--> <!--</dependency>--> <!-- flowable --> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> <version>${org.flowable.version}</version> </dependency> <!--<dependency>--> <!--<groupId>org.flowable</groupId>--> <!--<artifactId>flowable-spring-boot-starter-process</artifactId>--> <!--<version>${org.flowable.version}</version>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>org.flowable</groupId>--> <!--<artifactId>flowable-ui-modeler-logic</artifactId>--> <!--<version>${org.flowable.version}</version>--> <!--</dependency>--> <!--<dependency>--> <!--<groupId>org.liquibase</groupId>--> <!--<artifactId>liquibase-core</artifactId>--> <!--<!–<version>4.22.0</version>–>--> <!--</dependency>--> <!--请将liquibase版本升到最新版,而不是使用springboot默认指定的旧版本,我一指定就可以启动成功,用旧版本就不行--> <!--https://blog.csdn.net/weixin_39651356/article/details/125710531--> <dependency> <groupId>org.liquibase</groupId> <artifactId>liquibase-core</artifactId> <!--指定最新版,当前我这边是4.12.0--> <version>4.12.0</version> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-ui-modeler</artifactId> <version>${flowable.version}</version> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-ui-admin</artifactId> <version>${flowable.version}</version> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-ui-idm</artifactId> <version>${flowable.version}</version> </dependency> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-ui-task</artifactId> <version>${flowable.version}</version> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> </plugin> </plugins> </build> </project>
flowable.cfg.xml
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <bean id="processEngineConfiguration" class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration"> <property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/flowable-02?serverTimezone=UTC&nullCatalogMeansCurrent=true&useSSL=false" /> <property name="jdbcDriver" value="com.mysql.cj.jdbc.Driver" /> <property name="jdbcUsername" value="root" /> <property name="jdbcPassword" value="123456" /> <property name="databaseSchemaUpdate" value="true" /> <property name="asyncExecutorActivate" value="false" /> </bean> </beans>
application.yml
server: port: 8088 flowable: idm: app: admin: # 登录的用户名 user-id: admin # 登录的密码 password: admin # 用户的名字 first-name: wei last-name: kai spring: # mysql连接信息 datasource: # mysql8之后 driver-class-name: com.mysql.cj.jdbc.Driver # mysql8之前 # driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://localhost:3306/flowable-02?useUnicode=true&characterEncoding=utf8&tinyInt1isBit=false&useSSL=false&serverTimezone=GMT&nullCatalogMeansCurrent=true username: root password: 123456 jpa: properties: hibernate: hbm2ddl: auto: update dialect: org.hibernate.dialect.MySQL5InnoDBDialect open-in-view: true