flowable6.7.2 springboot 集成 flowable-ui
1、新建maven project
2、项目创建并集成flowable,加入依赖包
<parent> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-parent</artifactId> <version>2.6.2</version> <relativePath /> </parent> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <java.version>1.8</java.version> <flowable.version>6.7.2</flowable.version> <pagehelper.starter.version>1.4.2</pagehelper.starter.version> <antlr4-runtime.version>4.8</antlr4-runtime.version> <java.home>/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/jre </java.home> <spring.shiro.version>1.8.0</spring.shiro.version> </properties> <dependencies> <!-- spring-boot-starter-web start --> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <!-- spring-boot-starter-web end --> <!--flowable工作流依赖 start --> <dependency> <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter</artifactId> <version>${flowable.version}</version> </dependency> <!--flowable工作流依赖 end --> <!-- 添加flowable-ui依赖 --> <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> <!-- mybatis start --> <!--pagehelper分页 --> <!-- <dependency> <groupId>com.github.pagehelper</groupId> <artifactId>pagehelper-spring-boot-starter</artifactId> <version>${pagehelper.starter.version}</version> </dependency> --> <!-- druid --> <dependency> <groupId>com.alibaba</groupId> <artifactId>druid</artifactId> <version>1.1.10</version> </dependency> <!-- mysql jdbc --> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> </dependency> </dependencies>
3、创建包及application
在包下面新建文件:myFlowableUIApplication,并加入下面代码:
@SpringBootApplication public class myFlowableUIApplication extends SpringBootServletInitializer { public static void main(String[] args) { SpringApplication.run(myFlowableUIApplication.class, args); } }
暂时不要启动,没有加入配制,会报错。
4、resources下加入application.yml
server: port: 8080 servlet: context-path: / spring: datasource: type: com.alibaba.druid.pool.DruidDataSource driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://127.0.0.1:3306/myflowable?useSSL=false&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8&allowMultiQueries=true&nullCatalogMeansCurrent=true username: root password: admin druid: initialSize: 2 minIdle: 10 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validationQuery: select 1 testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true maxPoolPreparedStatementPerConnectionSize: 20 filters: stat,wall,slf4j stat-view-servlet: allow: login-username: admin login-password: 123456 connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000 flowable: #关闭定时任务JOB async-executor-activate: false database-schema-update: true
启动application
在地址栏中输入http://localhost:8080
admin/test 登录成功后
4个模块:
任务应用程序:这个模块主要进行流程相关的操作,比如发起、审核等,发布后的应用程序会显示在这里。 建模器应用程序:这个模块是核心,主要用来创建流程、发布流程等等。 管理员应用程序:这个模块就是管理发布的应用程序,可以上传/删除应用程序等等。 身份管理应用程序:这个模块就是用户管理模块,包括用户的创建、权限分配等等。
参考:https://blog.51cto.com/u_12880763/4646183
道法自然