Activiti 7.x 与Spring-Boot 整合

1.相关依赖


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


        
        
            org.activiti
            activiti-spring-boot-starter
            7.0.0.Beta4
        
        
            org.activiti
            activiti-image-generator
            7.0.0.Beta4
        
    

2.yml配置

activiti:
    history-level: full
    db-history-used: true
    database-schema-update: true

3.security配置不登陆验证

import org.springframework.context.annotation.Configuration;
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;

@Configuration
@EnableWebSecurity(debug = true)//已经自动配置了,此处只是为了打印debug信息
public class WebSecurityConfiguration extends WebSecurityConfigurerAdapter {

    @Override
    protected void configure(HttpSecurity http) throws Exception {
        http.csrf().disable().authorizeRequests().anyRequest().permitAll().and().logout().permitAll();
    }

}

项目中resources目录下创建processes文件夹。作用是Activiti7自动把processes目录下的流程定义文件同步到数据库中
注意:此目录必要放做好的流程定义文件,不然都会同步到数据库中

你可能感兴趣的:(Activiti 7.x 与Spring-Boot 整合)