关于spring boot 2.1.2集成 activiti6.0遇到的问题

Posted 滴滴哒滴哒

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了关于spring boot 2.1.2集成 activiti6.0遇到的问题相关的知识,希望对你有一定的参考价值。

先说解决方案

方案一:

启动类排除activiti扫描报错的部分

@SpringBootApplication( exclude = SecurityAutoConfiguration.class)
public class ScheduleApplication extends SpringBootServletInitializer 

	public static void main(String[] args) 
		SpringApplication.run(ScheduleApplication.class, args);
	

	@Override
	protected SpringApplicationBuilder configure(SpringApplicationBuilder application) 
		return application.sources(ScheduleApplication.class);
	

方案二:

这是已经适配spring boot 2.1.2 的jar包,根据readme调整

链接:https://pan.baidu.com/s/1-O2SSWL3ibIBOjBkwgVeIg 
提取码:b7ee 
 

再说遇到问题,项目使用的是spring boot 2.1.2,引入activiti6.0.0后

<!-- https://mvnrepository.com/artifact/org.activiti/activiti-spring-boot-starter-basic -->
<dependency>
	<groupId>org.activiti</groupId>
	<artifactId>activiti-spring-boot-starter-basic</artifactId>
	<version>6.0.0</version>
</dependency>

报错 

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'documentationPluginsBootstrapper' defined in URL [jar:file:/D:/apache-maven-3.3.9/repo/m2/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/DocumentationPluginsBootstrapper.class]: Unsatisfied dependency expressed through constructor parameter 1; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/D:/apache-maven-3.3.9/repo/m2/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1154) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:846) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:863) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:546) ~[spring-context-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.2.RELEASE.jar:2.1.2.RELEASE]
	at com.gbiac.sche.app.ScheduleApplication.main(ScheduleApplication.java:12) [classes/:na]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'webMvcRequestHandlerProvider' defined in URL [jar:file:/D:/apache-maven-3.3.9/repo/m2/io/springfox/springfox-spring-web/2.7.0/springfox-spring-web-2.7.0.jar!/springfox/documentation/spring/web/plugins/WebMvcRequestHandlerProvider.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:769) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:218) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1308) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1154) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1460) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1424) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1315) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1202) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	... 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1745) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:576) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1460) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1424) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveMultipleBeans(DefaultListableBeanFactory.java:1315) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1202) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1164) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:857) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:760) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	... 36 common frames omitted
Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
	at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_161]
	at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_161]
	at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_161]
	at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_161]
	at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_161]
	at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_161]
	at java.lang.Class.createAnnotationData(Class.java:3521) ~[na:1.8.0_161]
	at java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_161]
	at java.lang.Class.createAnnotationData(Class.java:3526) ~[na:1.8.0_161]
	at java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_161]
	at java.lang.Class.getAnnotation(Class.java:3415) ~[na:1.8.0_161]
	at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258) ~[na:1.8.0_161]
	at java.lang.Class.isAnnotationPresent(Class.java:3425) ~[na:1.8.0_161]
	at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:599) ~[spring-core-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:205) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.processCandidateBean(AbstractHandlerMethodMapping.java:251) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:211) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:199) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:164) ~[spring-webmvc-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1804) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1741) ~[spring-beans-5.1.4.RELEASE.jar:5.1.4.RELEASE]
	... 50 common frames omitted

activiti6.0.0在spring boot2之前发布的,所以有些api不兼容。所以在这里我们对activit源码进行修改,并重新打成jar包。

从GitHub上下载activiti6.0.0的源码

1、先找到spring-boot的依赖路径,

可以看到它原来是依赖spring-boot 1.2.6.RELEASE,在这里我们对版本进行修改,改成我们需要的版本

2、rebuild项目,可以发现报错冲突部分

①org.activiti.spring.boot.actuate.endpoint.ProcessEngineEndpoint

/* 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 org.activiti.spring.boot.actuate.endpoint;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl;
import org.activiti.engine.impl.persistence.deploy.DefaultDeploymentCache;
import org.activiti.engine.impl.persistence.deploy.DeploymentCache;
import org.activiti.engine.impl.persistence.deploy.ProcessDefinitionCacheEntry;
//import org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity;
import org.activiti.engine.repository.ProcessDefinition;
//import org.springframework.boot.actuate.endpoint.AbstractEndpoint;
import org.springframework.boot.actuate.endpoint.annotation.Endpoint;
import org.springframework.boot.actuate.endpoint.annotation.ReadOperation;
//import org.springframework.boot.context.properties.ConfigurationProperties;

import java.util.*;

/**
 * Registers a Boot Actuator endpoint that provides information on the
 * running process instance and renders BPMN diagrams of the deployed processes.
 *
 * @author Josh Long
 */
//@ConfigurationProperties(prefix = "endpoints.activiti")
@Endpoint(id = "activiti")
public class ProcessEngineEndpoint 

    private final ProcessEngine processEngine;

    public ProcessEngineEndpoint(ProcessEngine processEngine) 
//        super("activiti");
        this.processEngine = processEngine;
    

//    @Override
//    public Map<String, Object> invoke() 
    @ReadOperation
    public Map<String,Object> activiti()
        Map<String, Object> metrics = new HashMap<String, Object>();

        // Process definitions
        metrics.put("processDefinitionCount", processEngine.getRepositoryService().createProcessDefinitionQuery().count());

        // List of all process definitions
        List<ProcessDefinition> processDefinitions = processEngine.getRepositoryService().createProcessDefinitionQuery().orderByProcessDefinitionKey().asc().list();
        List<String> processDefinitionKeys = new ArrayList<String>();
        for (ProcessDefinition processDefinition : processDefinitions) 
            processDefinitionKeys.add(processDefinition.getKey() + " (v" + processDefinition.getVersion() + ")");
        
        metrics.put("deployedProcessDefinitions", processDefinitionKeys);

        // Process instances
        Map<String, Object> processInstanceCountMap = new HashMap<String, Object>();
        metrics.put("runningProcessInstanceCount", processInstanceCountMap);
        for (ProcessDefinition processDefinition : processDefinitions) 
            processInstanceCountMap.put(processDefinition.getKey() + " (v" + processDefinition.getVersion() + ")",
                    processEngine.getRuntimeService().createProcessInstanceQuery().processDefinitionId(processDefinition.getId()).count());
        
        Map<String, Object> completedProcessInstanceCountMap = new HashMap<String, Object>();
        metrics.put("completedProcessInstanceCount", completedProcessInstanceCountMap);
        for (ProcessDefinition processDefinition : processDefinitions) 
            completedProcessInstanceCountMap.put(processDefinition.getKey() + " (v" + processDefinition.getVersion() + ")",
                    processEngine.getHistoryService().createHistoricProcessInstanceQuery().finished().processDefinitionId(processDefinition.getId()).count());
        

        // Open tasks
        metrics.put("openTaskCount", processEngine.getTaskService().createTaskQuery().count());
        metrics.put("completedTaskCount", processEngine.getHistoryService().createHistoricTaskInstanceQuery().finished().count());


        // Tasks completed today
        metrics.put("completedTaskCountToday", processEngine.getHistoryService().createHistoricTaskInstanceQuery().finished().taskCompletedAfter(
                new Date(System.currentTimeMillis() - secondsForDays(1))).count());

        // Process steps
        metrics.put("completedActivities", processEngine.getHistoryService().createHistoricActivityInstanceQuery().finished().count());

        // Process definition cache
        DeploymentCache<ProcessDefinitionCacheEntry> deploymentCache = ((ProcessEngineConfigurationImpl) processEngine.getProcessEngineConfiguration()).getProcessDefinitionCache();
        if (deploymentCache instanceof DefaultDeploymentCache) 
            metrics.put("cachedProcessDefinitionCount", ((DefaultDeploymentCache) deploymentCache).size());
        
        return metrics;
    

    private long secondsForDays(int days) 
        int hour = 60 * 60 * 1000;
        int day = 24 * hour;
        return days * day;
    

②org.activiti.spring.boot.actuate.endpoint.ProcessEngineMvcEndpoint

/* 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 org.activiti.spring.boot.actuate.endpoint;

import java.io.InputStream;

import org.activiti.bpmn.BpmnAutoLayout;
import org.activiti.bpmn.model.BpmnModel;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.image.ProcessDiagramGenerator;
import org.activiti.image.impl.DefaultProcessDiagramGenerator;
//import org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter;
import org.springframework.core.io.InputStreamResource;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Renders a valid running BPMN process definition as a BPMN diagram.
 *
 * This is duplicative of the functionality in the full REST API implementation.
 *
 * @author Joram Barrez
 * @author Josh Long
 */
public class ProcessEngineMvcEndpoint  

    private final RepositoryService repositoryService;
    private final ProcessEngineEndpoint processEngineEndpoint;

    public ProcessEngineMvcEndpoint(ProcessEngineEndpoint processEngineEndpoint, RepositoryService repositoryService) 
//        super(processEngineEndpoint);
        this.processEngineEndpoint = processEngineEndpoint;
        this.repositoryService = repositoryService;
    

    /**
     * Look up the process definition by key. For example,
     * this is <A href="http://localhost:8080/activiti/processes/fulfillmentProcess">process-diagram for</A>
     * a process definition named @code fulfillmentProcess.
     */
    @RequestMapping(value = "/processes/processDefinitionKey:.*", method = RequestMethod.GET, produces = MediaType.IMAGE_JPEG_VALUE)
    @ResponseBody
    public ResponseEntity processDefinitionDiagram(@PathVariable String processDefinitionKey) 
      ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery()
              .processDefinitionKey(processDefinitionKey)
              .latestVersion()
              .singleResult();
      if (processDefinition == null) 
          return ResponseEntity.status(HttpStatus.NOT_FOUND).body(null);
      

      ProcessDiagramGenerator processDiagramGenerator = new DefaultProcessDiagramGenerator();
      BpmnModel bpmnModel = repositoryService.getBpmnModel(processDefinition.getId());

      if (bpmnModel.getLocationMap().size() == 0) 
          BpmnAutoLayout autoLayout = new BpmnAutoLayout(bpmnModel);
          autoLayout.execute();
      

      InputStream is = processDiagramGenerator.generateJpgDiagram(bpmnModel);
      return ResponseEntity.ok(new InputStreamResource(is));
  


③org.activiti.spring.boot.EndpointAutoConfiguration

/* 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 org.activiti.spring.boot;

import org.activiti.engine.ProcessEngine;
import org.activiti.engine.RepositoryService;
import org.activiti.spring.boot.actuate.endpoint.ProcessEngineEndpoint;
import org.activiti.spring.boot.actuate.endpoint.ProcessEngineMvcEndpoint;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * The idea behind this module is that Spring Security could
 * talk to the @link org.activiti.engine.IdentityService
 * as required.
 *
 * @author Josh Long
 */
@Configuration
//@ConditionalOnClass (name = "org.springframework.boot.actuate.endpoint.AbstractEndpoint")
public class EndpointAutoConfiguration 

    @Bean
    public ProcessEngineEndpoint processEngineEndpoint(ProcessEngine engine) 
        return new ProcessEngineEndpoint(engine);
    

    @Bean
    public ProcessEngineMvcEndpoint processEngineMvcEndpoint(
            ProcessEngineEndpoint engineEndpoint, RepositoryService repositoryService) 
        return new ProcessEngineMvcEndpoint(engineEndpoint, repositoryService);
    

④org.activiti.spring.boot.DataSourceProcessEngineAutoConfiguration

/* 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 org.activiti.spring.boot;

import java.io.IOException;

import javax.sql.DataSource;

import org.activiti.spring.SpringAsyncExecutor;
import org.activiti.spring.SpringProcessEngineConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureAfter;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
import org.springframework.transaction.PlatformTransactionManager;

/**
 * @author Joram Barrez
 * @author Josh Long
 */
@Configuration
@AutoConfigureAfter(DataSourceAutoConfiguration.class)
public class DataSourceProcessEngineAutoConfiguration 

  @Configuration
//  @ConditionalOnMissingClass(name= "javax.persistence.EntityManagerFactory")
  @ConditionalOnMissingClass(value= "javax.persistence.EntityManagerFactory")
  @EnableConfigurationProperties(ActivitiProperties.class)
  public static class DataSourceProcessEngineConfiguration extends AbstractProcessEngineAutoConfiguration 

    @Bean
    @ConditionalOnMissingBean
    public PlatformTransactionManager transactionManager(DataSource dataSource) 
      return new DataSourceTransactionManager(dataSource);
    

    @Bean
    @ConditionalOnMissingBean
    public SpringProcessEngineConfiguration springProcessEngineConfiguration(
            DataSource dataSource,
            PlatformTransactionManager transactionManager,
            SpringAsyncExecutor springAsyncExecutor) throws IOException 
      
      return this.baseSpringProcessEngineConfiguration(dataSource, transactionManager, springAsyncExecutor);
    
  

⑤org.activiti.spring.boot.SecurityAutoConfiguration

/* 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 org.activiti.spring.boot;

import org.activiti.engine.IdentityService;
import org.activiti.rest.security.BasicAuthenticationProvider;
import org.activiti.spring.security.IdentityServiceUserDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.authentication.AuthenticationProvider;
import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
import org.springframework.security.config.annotation.authentication.configurers.GlobalAuthenticationConfigurerAdapter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * Installs a Spring Security adapter for the Activiti
 * @link org.activiti.engine.IdentityService.
 *
 * @author Josh Long
 */
@Configuration
//@AutoConfigureBefore(org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class)
@AutoConfigureBefore(org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class)
public class SecurityAutoConfiguration 

  @Configuration
  @ConditionalOnClass( UserDetailsService.class)
  public static class UserDetailsServiceConfiguration
          extends GlobalAuthenticationConfigurerAdapter 

    @Override
    public void init(AuthenticationManagerBuilder auth) throws Exception 
      auth.userDetailsService( userDetailsService());
    

    @Bean
    public UserDetailsService userDetailsService() 
      return new IdentityServiceUserDetailsService(this.identityService);
    

    @Autowired
    private IdentityService identityService;
  
  
  @Configuration
  @ConditionalOnClass(name = "org.activiti.rest.service.api.RestUrls", "org.springframework.web.servlet.DispatcherServlet")
  @EnableWebSecurity
  public static class SecurityConfiguration extends WebSecurityConfigurerAdapter 

    @Bean
    public AuthenticationProvider authenticationProvider() 
      return new BasicAuthenticationProvider();
    

    @Override
    protected void configure(HttpSecurity http) throws Exception 
      http
        .authenticationProvider(authenticationProvider())
        .csrf().disable()
        .authorizeRequests()
          .anyRequest().authenticated()
          .and()
        .httpBasic();
    
  

主要是spring boot 1 和 2的一些配置方式和包结构不同

3.指定activiti-root下的pom

指定他的版本为6.0.0,而不是$project.version

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<name>Activiti</name>
	<description>BPM and workflow engine</description>
	<groupId>org.activiti</groupId>
	<artifactId>activiti-root</artifactId>

	<parent>
		<groupId>org.sonatype.oss</groupId>
		<artifactId>oss-parent</artifactId>
		<version>7</version>
	</parent>

	<packaging>pom</packaging>
	<version>6.0.0</version>
	<properties>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
		<spring.framework.version>4.2.5.RELEASE</spring.framework.version>
		<spring.security.version>4.0.4.RELEASE</spring.security.version>
		<mule.version>3.5.0</mule.version>
		<cxf.version>3.1.6</cxf.version>
		<batik.version>1.7</batik.version>
		<!-- JVM params for test execution -->
		<argLine>-Duser.language=en</argLine>

		<!-- OSGi bundles properties -->
		<activiti.artifact />
		<activiti.osgi.import.activiti.version>version="[$(version;==;$activiti.osgi.version.clean),$(version;=+;$activiti.osgi.version.clean))"</activiti.osgi.import.activiti.version>
		<activiti.osgi.import.strict.version>version="[$(version;===;$activiti.osgi.version.clean),$(version;==+;$activiti.osgi.version.clean))"</activiti.osgi.import.strict.version>
		<activiti.osgi.import.default.version>[$(version;==;$(@)),$(version;+;$(@)))</activiti.osgi.import.default.version>
		<activiti.osgi.import.defaults>
		</activiti.osgi.import.defaults>
		<activiti.osgi.import.before.defaults />
		<activiti.osgi.import.additional />
		<activiti.osgi.export.additional />
		<activiti.osgi.import.pkg>
			org.activiti.*;$activiti.osgi.import.activiti.version,
			$activiti.osgi.import.before.defaults,
			$activiti.osgi.import.defaults,
			$activiti.osgi.import.additional,
			*
		</activiti.osgi.import.pkg>
		<activiti.osgi.activator />
		<activiti.osgi.failok>false</activiti.osgi.failok>
		<activiti.osgi.export>$activiti.osgi.export.pkg;$activiti.osgi.version;-noimport:=true</activiti.osgi.export>
		<!-- <activiti.osgi.export.pkg>!*.impl;$activiti.artifact*</activiti.osgi.export.pkg>
			<activiti.osgi.private.pkg>$activiti.artifact*.impl</activiti.osgi.private.pkg> -->
		<activiti.osgi.export.pkg>
			$activiti.artifact*,
			$activiti.osgi.export.additional
		</activiti.osgi.export.pkg>
		<activiti.osgi.private.pkg></activiti.osgi.private.pkg>
		<activiti.osgi.version>version=6.0.0</activiti.osgi.version>
		<activiti.osgi.split.pkg>-split-package:=first</activiti.osgi.split.pkg>
		<activiti.osgi.import>$activiti.osgi.import.pkg</activiti.osgi.import>
		<activiti.osgi.dynamic />
		<activiti.osgi.symbolic.name>$activiti.artifact</activiti.osgi.symbolic.name>
		<activiti.osgi.exclude.dependencies>false</activiti.osgi.exclude.dependencies>
		<activiti.osgi.remove.headers>Ignore-Package,Include-Resource,Private-Package,Bundle-DocURL</activiti.osgi.remove.headers>
		<activiti.osgi.include.resource>maven-resources</activiti.osgi.include.resource>
		<activiti.osgi.embed></activiti.osgi.embed>
	</properties>

	<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>cglib</groupId>
				<artifactId>cglib</artifactId>
				<version>2.2</version>
			</dependency>
			<dependency>
				<groupId>com.h2database</groupId>
				<artifactId>h2</artifactId>
				<version>1.3.176</version>
			</dependency>
			<dependency>
				<groupId>commons-dbcp</groupId>
				<artifactId>commons-dbcp</artifactId>
				<version>1.4</version>
			</dependency>
			<!-- Logging -->
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-api</artifactId>
				<version>1.7.6</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>jcl-over-slf4j</artifactId>
				<version>1.7.6</version>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-log4j12</artifactId>
				<version>1.7.6</version>
			</dependency>
			<dependency>
				<groupId>commons-logging</groupId>
				<artifactId>commons-logging</artifactId>
				<version>1.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-lang3</artifactId>
				<version>3.3.2</version>
			</dependency>
			<dependency>
				<groupId>commons-io</groupId>
				<artifactId>commons-io</artifactId>
				<version>2.0.1</version>
			</dependency>
			<dependency>
				<groupId>commons-fileupload</groupId>
				<artifactId>commons-fileupload</artifactId>
				<version>1.2.2</version>
			</dependency>
			<dependency>
				<groupId>org.apache.httpcomponents</groupId>
				<artifactId>httpclient</artifactId>
				<version>4.3.5</version>
			</dependency>
			<dependency>
				<groupId>com.oracle.jdbc</groupId>
				<artifactId>ojdbc7</artifactId>
				<version>12.1.0.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>com.sun.xml.bind</groupId>
				<artifactId>jaxb-impl</artifactId>
				<version>2.2.11</version>
			</dependency>
			<dependency>
				<groupId>com.sun.xml.bind</groupId>
				<artifactId>jaxb-xjc</artifactId>
				<version>2.2.11</version>
			</dependency>
			<dependency>
				<groupId>javax.servlet</groupId>
				<artifactId>servlet-api</artifactId>
				<version>2.5</version>
			</dependency>
			<dependency>
				<groupId>javax.mail</groupId>
				<artifactId>mail</artifactId>
				<version>1.4.1</version>
			</dependency>
			<dependency>
				<groupId>javax.persistence</groupId>
				<artifactId>persistence-api</artifactId>
				<version>1.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>javax.enterprise.concurrent</groupId>
				<artifactId>javax.enterprise.concurrent-api</artifactId>
				<version>1.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>javax.xml.bind</groupId>
				<artifactId>jaxb-api</artifactId>
				<version>2.2.11</version>
			</dependency>
			<dependency>
				<groupId>de.odysseus.juel</groupId>
				<artifactId>juel-api</artifactId>
				<version>2.2.7</version>
			</dependency>
			<dependency>
				<groupId>de.odysseus.juel</groupId>
				<artifactId>juel-impl</artifactId>
				<version>2.2.7</version>
			</dependency>
			<dependency>
				<groupId>de.odysseus.juel</groupId>
				<artifactId>juel-spi</artifactId>
				<version>2.2.7</version>
			</dependency>
			<dependency>
				<groupId>junit</groupId>
				<artifactId>junit</artifactId>
				<version>4.11</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.assertj</groupId>
				<artifactId>assertj-core</artifactId>
				<!-- using version 2.x because version 3.x requires Java 8 -->
				<version>2.6.0</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>mysql</groupId>
				<artifactId>mysql-connector-java</artifactId>
				<version>5.1.27</version>
				<scope>test</scope>
			</dependency>
            <dependency>
                <groupId>org.activiti</groupId>
                <artifactId>activiti-secure-tasks</artifactId>
                <version>6.0.0</version>
            </dependency>
			<dependency>
				<groupId>com.ibm.db2.jcc</groupId>
				<artifactId>db2jcc4</artifactId>
				<version>10.1</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-engine</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-spring</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-bpmn-model</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-bpmn-converter</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-json-converter</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-explorer</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-simple-workflow</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-common-rest</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-rest</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-api</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-engine</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-model</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-xml-converter</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-json-converter</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-rest</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-dmn-engine-configurator</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-form-model</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-form-api</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-form-json-converter</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-form-engine</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-form-engine-configurator</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-camel</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-mule</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-crystalball</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-webapp-rest2</artifactId>
				<type>war</type>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-cxf</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-bpmn-layout</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-process-validation</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-image-generator</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti5-engine</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti5-spring</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti5-compatibility</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti5-spring-compatibility</artifactId>
				<version>6.0.0</version>
			</dependency>
			<dependency>
				<groupId>org.activiti</groupId>
				<artifactId>activiti-jmx</artifactId>
				<version>6.0.0</version>
			</dependency>
			<!-- EMAIL -->
			<dependency>
				<groupId>org.apache.commons</groupId>
				<artifactId>commons-email</artifactId>
				<version>1.4</version>
			</dependency>
			<!-- Web service -->
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-frontend-jaxws</artifactId>
				<version>$cxf.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-transports-http</artifactId>
				<version>$cxf.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-transports-http-jetty</artifactId>
				<version>$cxf.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.cxf</groupId>
				<artifactId>cxf-rt-bindings-soap</artifactId>
				<version>$cxf.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.geronimo.specs</groupId>
				<artifactId>geronimo-jta_1.1_spec</artifactId>
				<version>1.1.1</version>
			</dependency>
			<dependency>
				<groupId>org.opensaml</groupId>
				<artifactId>opensaml</artifactId>
				<version>1.1</version>
			</dependency>
			<dependency>
				<groupId>org.apache.openjpa</groupId>
				<artifactId>openjpa</artifactId>
				<version>1.2.2</version>
				<scope>test</scope>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.codehaus.groovy</groupId>
				<artifactId>groovy-all</artifactId>
				<version>2.4.5</version>
			</dependency>
			<dependency>
				<groupId>org.drools</groupId>
				<artifactId>drools-core</artifactId>
				<version>5.5.0.Final</version>
			</dependency>
			<dependency>
				<groupId>org.drools</groupId>
				<artifactId>drools-compiler</artifactId>
				<version>5.5.0.Final</version>
			</dependency>
			<dependency>
				<groupId>org.json</groupId>
				<artifactId>json</artifactId>
				<version>20070829</version>
			</dependency>
			<dependency>
				<groupId>org.mule.modules</groupId>
				<artifactId>mule-module-cxf</artifactId>
				<version>$mule.version</version>
			</dependency>
			<dependency>
				<groupId>org.mule.tests</groupId>
				<artifactId>mule-tests-functional</artifactId>
				<version>$mule.version</version>
			</dependency>
			<dependency>
				<groupId>org.mybatis</groupId>
				<artifactId>mybatis</artifactId>
				<version>3.4.2</version>
			</dependency>
			<dependency>
				<groupId>org.mockito</groupId>
				<artifactId>mockito-core</artifactId>
				<version>1.8.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.core</artifactId>
				<version>6.0.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.osgi</groupId>
				<artifactId>org.osgi.compendium</artifactId>
				<version>5.0.0</version>
				<scope>provided</scope>
			</dependency>
			<dependency>
				<groupId>org.apache.felix</groupId>
				<artifactId>org.apache.felix.fileinstall</artifactId>
				<version>3.5.4</version>
				<optional>true</optional>
			</dependency>
			<dependency>
				<groupId>org.slf4j</groupId>
				<artifactId>slf4j-jdk14</artifactId>
				<version>1.7.6</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-beans</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-core</artifactId>
				<version>$spring.framework.version</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-aop</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-jdbc</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-orm</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-tx</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-context-support</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-web</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-webmvc</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework</groupId>
				<artifactId>spring-test</artifactId>
				<version>$spring.framework.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-core</artifactId>
				<version>$spring.security.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-config</artifactId>
				<version>$spring.security.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-crypto</artifactId>
				<version>$spring.security.version</version>
			</dependency>
			<dependency>
				<groupId>org.springframework.security</groupId>
				<artifactId>spring-security-web</artifactId>
				<version>$spring.security.version</version>
			</dependency>
			<dependency>
				<groupId>org.subethamail</groupId>
				<artifactId>subethasmtp-wiser</artifactId>
				<version>1.2</version>
				<scope>test</scope>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.hsqldb</groupId>
				<artifactId>hsqldb</artifactId>
				<version>2.3.2</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>org.postgresql</groupId>
				<artifactId>postgresql</artifactId>
				<version>9.4-1201-jdbc4</version>
				<scope>test</scope>
			</dependency>
			<dependency>
				<groupId>wsdl4j</groupId>
				<artifactId>wsdl4j</artifactId>
				<version>1.6.2</version>
			</dependency>
			<dependency>
				<groupId>xerces</groupId>
				<artifactId>xercesImpl</artifactId>
				<version>2.10.0</version>
			</dependency>
			<dependency>
				<groupId>joda-time</groupId>
				<artifactId>joda-time</artifactId>
				<version>2.6</version>
			</dependency>
			<!-- Activiti Modeler -->
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-core</artifactId>
				<version>2.7.5</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-annotations</artifactId>
				<version>2.7.5</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.jackson.core</groupId>
				<artifactId>jackson-databind</artifactId>
				<version>2.7.5</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-parser</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-transcoder</artifactId>
				<version>$batik.version</version>
				<exclusions>
					<exclusion>
						<artifactId>commons-logging</artifactId>
						<groupId>commons-logging</groupId>
					</exclusion>
				</exclusions>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-bridge</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-codec</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-css</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-svg-dom</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.apache.xmlgraphics</groupId>
				<artifactId>batik-svggen</artifactId>
				<version>$batik.version</version>
			</dependency>
			<dependency>
				<groupId>org.imgscalr</groupId>
				<artifactId>imgscalr-lib</artifactId>
				<version>4.2</version>
			</dependency>
			<dependency>
				<groupId>math.geom2d</groupId>
				<artifactId>javaGeom</artifactId>
				<version>0.11.1</version>
			</dependency>
			<!-- Camel integration -->
			<dependency>
				<groupId>org.apache.camel</groupId>
				<artifactId>camel-spring</artifactId>
				<version>2.17.1</version>
			</dependency>
			<!-- Mule integration -->
			<dependency>
				<groupId>org.safehaus.jug</groupId>
				<artifactId>jug</artifactId>
				<classifier>lgpl</classifier>
				<version>2.0.0</version>
			</dependency>
			<dependency>
				<groupId>com.fasterxml.uuid</groupId>
				<artifactId>java-uuid-generator</artifactId>
				<version>3.1.3</version>
			</dependency>
			<dependency>
				<groupId>net.sourceforge.jtds</groupId>
				<artifactId>jtds</artifactId>
				<version>1.3.0</version>
			</dependency>
			<dependency>
				<groupId>com.googlecode.catch-exception</groupId>
				<artifactId>catch-exception</artifactId>
				<version>1.2.0</version>
				<scope>test</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<modules>
		<module>modules/activiti-bpmn-model</module>
		<module>modules/activiti-process-validation</module>
		<module>modules/activiti-bpmn-layout</module>
		<module>modules/activiti-image-generator</module>
		<module>modules/activiti-bpmn-converter</module>
		<module>modules/activiti-form-model</module>
		<module>modules/activiti-form-api</module>
		<module>modules/activiti-dmn-model</module>
		<module>modules/activiti-dmn-api</module>
		<module>modules/activiti-engine</module>
	</modules>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>2.3.2</version>
				<configuration>
					<source>1.7</source>
					<target>1.7</target>
					<showDeprecation>true</showDeprecation>
					<showWarnings>true</showWarnings>
					<optimize>true</optimize>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-surefire-plugin</artifactId>
				<version>2.7.1</version>
				<configuration>
					<failIfNoTests>false</failIfNoTests>
					<trimStackTrace>false</trimStackTrace>
					<redirectTestOutputToFile>true</redirectTestOutputToFile>
					<excludes>
						<exclude>**/*TestCase.java</exclude>
					</excludes>
					<runOrder>alphabetical</runOrder>
				</configuration>
			</plugin>
			<plugin>
				<groupId>org.apache.felix</groupId>
				<artifactId>maven-bundle-plugin</artifactId>
				<version>2.1.0</version>
				<extensions>true</extensions>
				<configuration>
					<excludeDependencies>$activiti.osgi.exclude.dependencies</excludeDependencies>
					<instructions>
						<Bundle-Name>$project.name</Bundle-Name>
						&

以上是关于关于spring boot 2.1.2集成 activiti6.0遇到的问题的主要内容,如果未能解决你的问题,请参考以下文章

关于 Angular 中的 Microsoft Graph API 集成 - Spring Boot 应用程序

在 Spring Boot 中跳过关于 *** DNS 可用性的集成测试

企业分布式微服务云SpringCloud SpringBoot mybatis (三十)关于spring boot集成apidoc

spring-boot学习之集成mybatis

Spring Boot 入门:集成RabbitMQ消息队列

Spring Boot教程14——集成测试