activiti的springboot模块
目标:
springboot 下 使用activiti,搭建微服务,并且使用自己的用户与组
版本
activiti version 5.22.0
spring boot version 1.5.1
主要配置
@Configuration public class MyConfiguration implements ProcessEngineConfigurationConfigurer { /** * @param springProcessEngineConfiguration - 类为spring boot默认使用的流程引擎配置类 */ @Override public void configure(SpringProcessEngineConfiguration springProcessEngineConfiguration) { //已验证-图片不会出现中文乱码 springProcessEngineConfiguration.setActivityFontName("宋体"); springProcessEngineConfiguration.setLabelFontName("宋体"); springProcessEngineConfiguration.setAnnotationFontName("宋体"); //待验证 springProcessEngineConfiguration.setDbIdentityUsed(false); List<SessionFactory> mySess = new ArrayList<SessionFactory>(); mySess.add(new CustomUserEntityManagerFactory()); mySess.add(new CustomGroupEntityManagerFactory()); springProcessEngineConfiguration.setCustomSessionFactories(mySess); springProcessEngineConfiguration.setDatabaseType("mysql"); } }
核心pom
<!-- activiti 升级到6.0.0改动很大,需谨慎--> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-spring-boot-starter-basic</artifactId> <version>${activiti.version}</version> <exclusions> <exclusion> <groupId>org.mybatis</groupId> <artifactId>mybatis</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.activiti</groupId> <artifactId>activiti-modeler</artifactId> <version>${activiti.version}</version> </dependency>