Activity6.0集成springboot2.0

2021-01-08 08:35

阅读:604

标签:yun   end   ble   logback   als   mysq   tps   uri   root   

1、添加依赖

xml version="1.0" encoding="UTF-8"?>
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.0modelVersion>

    groupId>com.xiaofeiyanggroupId>
    artifactId>activitiartifactId>
    version>1.0-SNAPSHOTversion>
    parent>
        groupId>org.springframework.bootgroupId>
        artifactId>spring-boot-starter-parentartifactId>
        version>2.2.1.RELEASEversion>
        relativePath/> 
    parent>
    properties>
        java.version>1.8java.version>
    properties>

    dependencies>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-webartifactId>
        dependency>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-aopartifactId>
        dependency>

        dependency>
            groupId>org.mybatis.spring.bootgroupId>
            artifactId>mybatis-spring-boot-starterartifactId>
            version>2.1.0version>
        dependency>

        dependency>
            groupId>org.projectlombokgroupId>
            artifactId>lombokartifactId>
            optional>trueoptional>
        dependency>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-testartifactId>
            scope>testscope>
        dependency>
        dependency>
            groupId>com.alibabagroupId>
            artifactId>druidartifactId>
            version>1.1.6version>
        dependency>
        dependency>
            groupId>org.activitigroupId>
            artifactId>activiti-spring-boot-starterartifactId>
            version>7.1.0.M1version>
        dependency>
        dependency>
            groupId>mysqlgroupId>
            artifactId>mysql-connector-javaartifactId>
            
            version>5.1.30version>
        dependency>
        dependency>
            groupId>net.logstash.logbackgroupId>
            artifactId>logstash-logback-encoderartifactId>
            version>5.1version>
        dependency>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-data-redisartifactId>
        dependency>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-jerseyartifactId>
        dependency>
        dependency>
            groupId>org.apache.cxfgroupId>
            artifactId>cxf-spring-boot-starter-jaxwsartifactId>
            version>3.2.4version>
        dependency>
        dependency>
            groupId>org.apache.cxfgroupId>
            artifactId>cxf-spring-boot-starter-jaxrsartifactId>
            version>3.2.4version>
        dependency>
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-actuatorartifactId>
        dependency>
        dependency>
            groupId>redis.clientsgroupId>
            artifactId>jedisartifactId>
        dependency>
        
        dependency>
            groupId>org.springframework.bootgroupId>
            artifactId>spring-boot-starter-securityartifactId>
        dependency>
        dependency>
            groupId>org.springframework.security.oauthgroupId>
            artifactId>spring-security-oauth2artifactId>
            version>2.0.14.RELEASEversion>
        dependency>
        dependency>
            groupId>org.springframework.securitygroupId>
            artifactId>spring-security-jwtartifactId>
            version>1.0.8.RELEASEversion>
        dependency>
        dependency>
            groupId>io.jsonwebtokengroupId>
            artifactId>jjwtartifactId>
            version>0.9.0version>
        dependency>
        dependency>
            groupId>com.github.pagehelpergroupId>
            artifactId>pagehelper-spring-boot-starterartifactId>
            version>1.2.3version>
        dependency>
        dependency>
            groupId>net.sf.jmimemagicgroupId>
            artifactId>jmimemagicartifactId>
            version>0.1.5version>
        dependency>
        
        
        
        
        
        dependency>
            groupId>com.alibabagroupId>
            artifactId>fastjsonartifactId>
            version>1.2.51version>
        dependency>

        dependency>
            groupId>javax.mailgroupId>
            artifactId>javax.mail-apiartifactId>
            version>1.5.3version>
        dependency>
        dependency>
            groupId>com.sun.mailgroupId>
            artifactId>javax.mailartifactId>
            version>1.5.3version>
        dependency>
        dependency>
            groupId>javax.servletgroupId>
            artifactId>javax.servlet-apiartifactId>
            version>4.0.1version>
            scope>providedscope>
        dependency>
        dependency>
            groupId>com.google.guavagroupId>
            artifactId>guavaartifactId>
            version>16.0.1version>
        dependency>
        dependency>
            groupId>com.google.protobufgroupId>
            artifactId>protobuf-javaartifactId>
            version>2.5.0version>
        dependency>
        
        
        
        
        
        
        
        
        
        
        dependency>
            groupId>commons-beanutilsgroupId>
            artifactId>commons-beanutilsartifactId>
            version>1.7.0version>
        dependency>
        dependency>
            groupId>com.github.tobatogroupId>
            artifactId>fastdfs-clientartifactId>
            version>1.26.2version>
        dependency>
        
        
        
        
        
        dependency>
            groupId>commons-langgroupId>
            artifactId>commons-langartifactId>
            version>2.5version>
        dependency>
        dependency>
            groupId>org.apache.commonsgroupId>
            artifactId>commons-collections4artifactId>
            version>4.2version>
        dependency>

        
        dependency>
            groupId>com.aliyungroupId>
            artifactId>aliyun-java-sdk-coreartifactId>
            version>4.1.1version>
        dependency>
        dependency>
            groupId>com.aliyungroupId>
            artifactId>aliyun-java-sdk-dysmsapiartifactId>
            version>1.1.0version>
        dependency>

        
        dependency>
            groupId>com.google.zxinggroupId>
            artifactId>coreartifactId>
            version>3.4.0version>
        dependency>
        dependency>
            groupId>com.google.zxinggroupId>
            artifactId>javaseartifactId>
            version>3.4.0version>
        dependency>

        
        dependency>
            groupId>com.aliyun.openservicesgroupId>
            artifactId>aliyun-logartifactId>
            version>0.6.7version>
            exclusions>
                exclusion>
                    groupId>com.google.protobufgroupId>
                    artifactId>protobuf-javaartifactId>
                exclusion>
            exclusions>
        dependency>

        
        

        
        dependency>
            groupId>com.alibabagroupId>
            artifactId>easyexcelartifactId>
            version>1.1.2-beta5version>
        dependency>
        dependency>
            groupId>org.apache.axis2groupId>
            artifactId>axis2-adb-codegenartifactId>
            version>1.7.7version>
        dependency>
        dependency>
            groupId>org.apache.axis2groupId>
            artifactId>axis2-transport-httpartifactId>
            version>1.7.7version>
        dependency>
        dependency>
            groupId>org.apache.axis2groupId>
            artifactId>axis2-transport-localartifactId>
            version>1.7.7version>
        dependency>
        
        
        dependency>
            groupId>axisgroupId>
            artifactId>axisartifactId>
            version>1.4version>
        dependency>
    dependencies>
    build>
        resources>
            resource>
                directory>src/main/javadirectory>
                includes>
                    include>**/*.xmlinclude>
                includes>
                filtering>falsefiltering>
            resource>
            resource>
                directory>src/main/resourcesdirectory>
                includes>
                    include>**/*.ymlinclude>
                    include>**/*.xmlinclude>
                includes>
                filtering>falsefiltering>
            resource>
        resources>
        finalName>${project.artifactId}-1.0.0finalName>
        plugins>
            plugin>
                groupId>org.springframework.bootgroupId>
                artifactId>spring-boot-maven-pluginartifactId>
            plugin>
        plugins>
    build>
project>

 

2、创建activiti数据库

3、创建配置activiti配置文件

activiti.cfg.xml

xml version="1.0" encoding="UTF-8"?>
beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
                           http://www.springframework.org/schema/beans/spring-beans.xsd">
    bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
        property name="databaseType" value="mysql">property>
        property name="jdbcUrl" value="jdbc:mysql://localhost:3306/activiti">property>
        property name="jdbcDriver" value="com.mysql.jdbc.Driver">property>
        property name="jdbcUsername" value="root">property>
        property name="jdbcPassword" value="123">property>
    bean>
beans>

 

4、创建activiti表

import org.activiti.engine.impl.db.DbSchemaCreate;

/**
 * @author: yangchun
 * @description:
 * @date: Created in 2020-05-26 17:04
 */
public class CreateActivitiTables {
    public static void main(String[] args) {
        DbSchemaCreate.main(args);
    }
}

5、创建流程图

 

xml version="1.0" encoding="UTF-8"?>
xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
name="databaseType" value="mysql">
name="jdbcUrl" value="jdbc:mysql://localhost:3306/activiti">
name="jdbcDriver" value="com.mysql.jdbc.Driver">
name="jdbcUsername" value="root">
name="jdbcPassword" value="123">

Activity6.0集成springboot2.0

标签:yun   end   ble   logback   als   mysq   tps   uri   root   

原文地址:https://www.cnblogs.com/xiaofeiyang/p/12967391.html


评论


亲,登录后才可以留言!