Flowable实战(二)集成Springboot

本篇介绍Flowable集成Springboot的具体操作,包括创建Spingboot项目、加入Flowable依赖包、添加数据源、REST支持等内容。
摘要由CSDN通过智能技术生成

1、创建Springboot项目

  打开IDEA,通过File -> New -> Project… -> Spring Initializr 创建一个新的Springboot项目

在这里插入图片描述

  在下一个界面,填入项目名Name,JDK选择8

在这里插入图片描述

  接着,选择Springboot 2.6.2

在这里插入图片描述

  点击完成

在这里插入图片描述

  生成空的Springboot项目,pom.xml文件内容:

在这里插入图片描述

2、加入Flowable依赖包

  修改pom.xml文件

  "properties"属性下加入:

<flowable.version>6.7.2</flowable.version>

注意,请确保Flowable版本与Springboot版本匹配,否则会无法启动。查看Flowable不同版本对应的springboot版本,参考:https://blog.csdn.net/JinYJ2014/article/details/121530632

  "dependencies"属性下加入:

<dependency>
    <groupId>org.flowable</groupId>
    <artifactId>flowable-spring-boot-starter</artifactId>
    <version>${flowable.version}</version>
</dependency>

  这个依赖会自动向classpath添加正确的Flowable与Spring依赖。

注意:有时候,依赖JAR无法自动获取,可以右键点击项目,并选择 Maven ->Reload Project以强制手动刷新。

  现在可以编写Spring Boot应用了:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@SpringBootApplication
public class FlowableExampleApplication {
   

    public static void main(String[] args) {
   

        SpringApplication.run(FlowableExampleApplication.class, args);
    }

  • 4
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值