1、整合activity设计器参考了https://blog.csdn.net/qq_33263527/article/details/89312672这篇博文
2.由于我的activity是5.17版本和参考博文不同,没有通过@EnableAutoConfiguration的方式来排除security的引入,而是在pom引入中排了security相关jar
我的pom:
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-diagram-rest</artifactId>
<version>5.22.0</version>
<exclusions>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-modeler</artifactId>
<version>5.22.0</version>
<exclusions>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
</exclusion>
</exclusions>
</dependency>
3.静态资源拦截配置
import cc.mrbird.febs.common.utils.SpringContextUtil;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
import java.util.List;
@Configuration
public class MvcConfigurer implements WebMvcConfigurer {
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry){
List<String> profileList = SpringContextUtil.getActiveProfile();
//****** 访问控制,需和“SwaggerConfig”上“@Profile”保持一致
if (profileList.contains(“test”) || profileList.contains(“dev”) || profileList.contains(“local”) || profileList.contains(“default”)) {
registry.addResourceHandler(“swagger-ui.html”)
.addResourceLocations(“classpath:/META-INF/resources/”);
registry.addResourceHandler(“/webjars”)
.addResourceLocations(“classpath:/META-INF/resources/webjars/”);
registry.addResourceHandler(“/workflow/**”)
.addResourceLocations(“classpath:/static/”);
registry.addResourceHandler(“/workflow/**”)
.addResourceLocations(“classpath:/workflow/”);
}
}
}
4.整合完成之后浏览器访问:http://localhost:9527/wxappadmin/service/create
5.当点击右上角X时浏览器会跳转这个地址http://localhost:9527/wxappadmin/workflow,这里需要我们进这个X的跳转地址进行修改,新增一个查询模型列表的接口,模型就是点击save保存的部署文件。
@Log(“查询模型列表”)
@GetMapping
@RequestMapping(“modelist”)
public List<Model> modelList(){
List<Model> models = repositoryService.createModelQuery().orderByCreateTime().desc().list();
return models;
}
然后找到toolbar-default-actions.js文件,找到closeEditor方法,修改成上面的查询模型列表的接口地址,我这里是这样
现在点击X时就浏览器地址http://localhost:9527/wxappadmin/service/modelist 返回模型列表数据
这里可以写成页面将数据列表展示。
6.最后附上流程部署和启动等相关API封装的接口。
https://download.csdn.net/download/qq_15076569/12076403
————————————————
版权声明:本文为CSDN博主「徐川江的个人博客」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_15076569/article/details/103815377