快速使用IDEA搭建SpringBoot项目,集成Activiti7(一)

详解springBoot集成activiti7,使用actiBPM绘制流程图(二) 

详解springBoot集成activiti7,工作流实战案例(三)

1.使用IDEA快速搭建springBoot项目

  • 自己百度或者直接跳转:https://blog.csdn.net/frank_come/article/details/80824968

2.引入pom依赖

    
        org.springframework.boot
        spring-boot-starter-parent
        2.0.4.RELEASE
         
    

    
        UTF-8
        UTF-8
        1.8
    

    
        
            
                org.activiti.cloud.dependencies
                activiti-cloud-dependencies
                7.0.0.Beta3
                import
                pom
            
        
    
	

		
		
			org.springframework.boot
			spring-boot-starter-web
		

		
		
			org.activiti
			activiti-spring-boot-starter
		

		
		
			mysql
			mysql-connector-java
			5.1.47
		

		
		
			com.alibaba
			druid
			1.1.16
		

		
		
			org.springframework.boot
			spring-boot-starter-test
			test
		

	

PS:这里注意使用boot得版本问题,activiti7的版本跟boot版本相差太大会报错,要么都用最新的版本

  • Exception in thread "main" java.lang.NoClassDefFoundError: org/springframewo(错误异常)

3.配置文件application.yml

spring:
  #Activiti property configuration
  activiti:
    database-schema-update: true
    history-level: full
    db-history-used: true

  datasource:
    url: jdbc:mysql://localhost:3306/activiti_test?useUnicode=true&characterEncoding=utf-8&useSSL=true&serverTimezone=UTC&nullCatalogMeansCurrent=true
    username: root
    password: root
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource

    initialization-mode: always

    initialSize: 5
    minIdle: 5
    maxActive: 20
    maxWait: 60000
    timeBetweenEvictionRunsMillis: 60000
    minEvictableIdleTimeMillis: 300000
    validationQuery: SELECT 1 FROM DUAL
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    poolPreparedStatements: true
    filters: stat,wall,log4j
    maxPoolPreparedStatementPerConnectionSize: 20
    useGlobalDataSourceStat: true
    connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMillis=500

ps:这里只需要修改数据库即可!!!!

4.启动springBoot应用,启动完成后查看数据库

  • 生成以下25张表即成功

快速使用IDEA搭建SpringBoot项目,集成Activiti7(一)_第1张图片

 快速使用IDEA搭建SpringBoot项目,集成Activiti7(一)_第2张图片

你可能感兴趣的:(boot)