activiti6 springboot2 druid数据连接池配置实验

阿里连接池得配置

 1.1创建配置文件activiti_druid.cfg.xml

 

 1.2配置内容

<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneInMemProcessEngineConfiguration">
<property name="databaseSchemaUpdate" value="true" />
<property name="dataSource" ref="dataSource"></property>
</bean>

<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="url" value="jdbc:mysql://172.16.50.44:3306/xy-test"/>
<property name="driverClassName" value="com.mysql.jdbc.Driver"/>
<property name="username" value="root"/>
<property name="password" value="root"/>
<property name="initialSize" value="1"/>
<property name="maxActive" value="10"/>
<property name="filters" value="stat,slf4j"/>
</bean>

1.3创建流程引擎代码
@Test
public void ConfigDBTest2(){
ProcessEngineConfiguration configuration = ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("activiti_druid.cfg.xml");
LOGGER.info("启动配置configuration",configuration);

ProcessEngine processEngine = configuration.buildProcessEngine();
LOGGER.info("获取流程引擎[{}]",processEngine.getName());
processEngine.close();
}





posted @ 2019-04-15 10:40  祖国的花朵-残花  阅读(1409)  评论(0编辑  收藏  举报