springCloud maven 多模块项目,在idea中集成activiti工作流项目。
springCloud项目以RuoYI 项目为基础搭建:https://gitee.com/y_project/RuoYi-Cloud
activiti工作流项目参照:https://gitee.com/calvinhwang123/RuoYi-Process
首先在springcloud 项目中创建子模块:activiti,可以不选任何的依赖包。
将RuoYi-Process中的后端代码复制到activiti子模块中,解决好各种依赖和冲突。
由于activiti模块需要作为单独的项目启动,因此添加网关依赖,数据库连接依赖,公共依赖,activiti的依赖等:
<!-- SpringCloud Alibaba Nacos --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency><!-- SpringCloud Alibaba Nacos Config --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId></dependency><!-- SpringBoot Actuator --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-actuator</artifactId></dependency>
<!-- Mysql Connector --><dependency><groupId>mysql</groupId><artifactId>mysql-connector-java</artifactId></dependency>
<dependency><groupId>org.activiti</groupId><artifactId>activiti-spring-boot-starter-rest-api</artifactId><version>${activiti.version}</version></dependency><!--activiti modeler 5.22 start--><dependency><groupId>org.activiti</groupId><artifactId>activiti-json-converter</artifactId><version>6.0.0</version><exclusions><exclusion><groupId>org.activiti</groupId><artifactId>activiti-bpmn-model</artifactId></exclusion></exclusions></dependency><!-- xml解析依赖--><dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-codec</artifactId><version>1.7</version></dependency><dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-css</artifactId><version> 1.7</version></dependency><dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-svg-dom</artifactId><version>1.7</version></dependency><dependency><groupId>org.apache.xmlgraphics</groupId><artifactId>batik-svggen</artifactId><version>1.7</version></dependency><!-- xml解析依赖--><!--activiti modeler 5.22 end-->
<!-- Corrections Common Log --><dependency><groupId>com.cmcc.ict</groupId><artifactId>corrections-common-log</artifactId></dependency><!-- Corrections Common Security--><dependency><groupId>com.cmcc.ict</groupId><artifactId>corrections-common-security</artifactId></dependency><!-- Corrections Common DataSource --><dependency><groupId>com.cmcc.ict</groupId><artifactId>corrections-common-datasource</artifactId></dependency><!-- Corrections Common DataScope --><dependency><groupId>com.cmcc.ict</groupId><artifactId>corrections-common-datascope</artifactId></dependency><!-- Corrections common feign --><dependency><groupId>com.cmcc.ict</groupId><artifactId>corrections-common-feign</artifactId></dependency>
<dependency><groupId>org.mybatis</groupId><artifactId>mybatis</artifactId><version>3.4.6</version></dependency>
<!-- SpringBoot集成thymeleaf模板 --><dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-thymeleaf</artifactId></dependency>
由于前端用到了thymeleaf,需要添加thymeleaf依赖。
解决好各种冲突依赖后,项目可以尝试启动了。