- 创建新模块:在若依项目中创建一个新的模块,如
ruoyi-activiti
,用于集成Activiti工作流引擎。 - 添加依赖:在pom.xml中配置增加新模块
<dependency>
<groupId>ruoyi</groupId>
<artifactId>ruoyi-activiti</artifactId>
<version>${usbu.version}<version>
</dependency>
<modules>
...
<module>ruoyi-activiti</module>
<modules>
如果你不在ruoyi-activiti下开发流程代码,比如你要在ruoyi-system下开发流程相关代码,你需要在ruoyi-system下的pom.xml文件中加入依赖
<dependency>
<groupId>ruoyi</groupId>
<artifactId>ruoyi-activiti</artifactId>
</dependency>
在ruoyi-activiti
模块的pom.xml
文件中添加Activiti的Spring Boot Starter依赖以及其他必要的依赖(如MyBatis、数据库连接池等)
<parent>
<groupId>ruoyi</groupId>
<artifactId>com.ruoyi</artifactId>
<version></version>
</parent>
<modelVersion></modelVersion>
<artifactId>ruoyi-activiti</artifactId>
<properties>
<activiti.version>6.0.0</activiti.version>
</properties>
<dependencies>
<!-- 其他子模块-->
<dependency>
<groupId>com.ruoyi</groupId>
<artifactId>ruoyi-common</artifactId>
</dependency>
<!-- Activiti -->
<!-- 实现Activiti与Spring框架的集成,提供灵活的配置和管理方式,并支持与Spring Security的集成以实现权限控制-->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring</artifactId>
<version>${activiti.version}</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 负责BPMN模型与JSON数据之间的转换,支持流程定义的动态处理-->
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-json-converter</artifactId>
<version>${activiti.version}</version>
<exclusions>
<exclusion>
<groupId>org.activiti</groupId>
<artifactId>activiti-bpmn-model</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- 数据库-->
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
<!-- xml解析依赖-->
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-codec</artifactId>
<version>1.13<version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-css</artifactId>
<version>1.13<version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svg-dom</artifactId>
<version>1.13<version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-svggen</artifactId>
<version>1.13<version>
</dependency>
<dependency>
<groupId>org.apache.xmlgraphics</groupId>
<artifactId>batik-transcoder</artifactId>
<version>1.13<version>
</dependency>
<!-- 其他依赖,如ruoyi框架的依赖、MyBatis、数据库连接池等 -->
</dependencies>