源码
githup上下载老版本源码https://github.com/flowable/flowable-engine/releases
gitHub:https://github.com/flowable/flowable-engine
flowable的sql文件则需要到官网下载:flowable官网
下载后解压,sql文件在 flowable-6.5.0\database\create\all中,根据需要导入即可,我使用的是mysql,即导入flowable.mysql.all.create.sql文件
flowable-6.5.0 源码目录
开始正题:直接在springboot集成flowable modeler设计器,比自带的更便利好用,使用的版本是springboot2.3.1,flowable6.5.0maven依赖
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>priv.gitonline</groupId>
<artifactId>flowable-ui</artifactId>
<version>1.0</version>
<name>flowable-ui</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<flowable.version>6.5.0</flowable.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<!-- flowable 集成依赖 rest,logic,conf -->
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-modeler-rest</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-modeler-logic</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-ui-modeler-conf</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
需要的文件
1.复制源代码 modules\flowable-ui-modeler\flowable-ui-modeler-app\src\main\resources\static文件夹下的所有文件到springboot项目的resources文件夹下
2.复制AppDispatcherServletConfiguration到任意位置
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package priv.gitonline.flowable.ui.config;
import org.flowable.ui.modeler.rest.app.EditorGroupsResource;
import org.flowable.ui.modeler.rest.app.EditorUsersResource;
import org.flowable.ui.modeler.rest.app.StencilSetResource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Bean;
import org.springframework.contex