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>-->
          <!--&lt;!&ndash;<version>4.22.0</version>&ndash;&gt;-->
       <!--</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&amp;nullCatalogMeansCurrent=true&amp;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

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章