In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article mainly introduces how to use springboot activiti to turn off verification automatic deployment mode, the article is very detailed, has a certain reference value, interested friends must read it!
Springboot activiti turn off verification automatic deployment # spring-activiti# automatic deployment verification settings: true- on (default), false- turn off spring.activiti.check-process-definitions=false# asyncExecutorEnabled property setting true will replace those old Job executorspring.activiti.async-executor-enabled=false spring.activiti.job-executor-activate=false# asyncExecutorActivate means that activiti activates AsyncExecutor when the process engine starts Async: true- on (default), false- off spring.activiti.async-executor-activate=true# using custom mybatis-mapperspring.activiti.custom-mybatis-mappers=spring.activiti.custom-mybatis-xmlmappers=SpringBoot2.0 activiti6.0 automatic deployment flowchart
I'd like to share with you two ways to automate the deployment process that I've summarized:
1. Modify the configuration of activiti in yaml file
2. Automatically execute the deployment method when the SpringBoot project starts
1) modify the check-process-definitions (automatic check, deployment process definition file) in the yaml file to false
2) create a new implementation class to implement the run method in ApplicationRunner, and add @ Component annotation above the class
Package com.komlin.controller;import org.activiti.engine.RepositoryService;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.boot.ApplicationArguments;import org.springframework.boot.ApplicationRunner;import org.springframework.core.io.Resource;import org.springframework.core.io.support.PathMatchingResourcePatternResolver;import org.springframework.stereotype.Component;import java.io.IOException / * Description: deployment flowchart * date: 17:07 on 2020-7-8 * * @ author mt * @ since JDK 1.8 * / @ Componentpublic class ApplicationRunnerImpl implements ApplicationRunner {@ Autowired RepositoryService repositoryService; @ Override public void run (ApplicationArguments args) throws Exception {Resource [] resources = null; try {resources = new PathMatchingResourcePatternResolver () .getResources ("classpath:processes/*.bpmn") } catch (IOException e) {e.printStackTrace ();} for (Resource r: resources) {String addr = "processes/" + r.getFilename (); repositoryService.createDeployment (). AddClasspathResource (addr). Deploy ();}
Note: the id in the newly created flowchart must be consistent with the name of the flowchart, otherwise the scanning flowchart will report an error.
The above is all the contents of the article "how to use springboot activiti to turn off and verify automatic deployment". Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.