flowable 风格配置文件 flowable.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"><!-- dataSource相关bean --><bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"><property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><property name="url"><value>jdbc:mysql://127.0.0.1:3306/flowable?useUnicode=true&characterEncoding=UTF-8</value></property><property name="username"><value>root</value></property><property name="password" value="123456"/></bean><bean id="processEngineConfiguration"class="org.flowable.engine.impl.cfg.StandaloneProcessEngineConfiguration"><property name="databaseType" value="mysql"></property><property name="dataSource" ref="dataSource"></property><property name="databaseSchemaUpdate" value="true"></property></bean>
</beans>
spring风格配置文件 flowable-context.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="dataSource" class="com.alibaba.druid.pool.DruidDataSource"><property name="driverClassName"><value>com.mysql.jdbc.Driver</value></property><property name="url"><value>jdbc:mysql://127.0.0.1:3306/flowable?useUnicode=true&characterEncoding=UTF-8</value></property><property name="username"><value>root</value></property><property name="password" value="123456"/></bean><bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"><property name="dataSource" ref="dataSource"/></bean><bean id="processEngineConfiguration" class="com.webcreate.spring.CusSpringProcessEngineConfiguration"><property name="dataSource" ref="dataSource"/><property name="transactionManager" ref="transactionManager"/><property name="databaseSchemaUpdate" value="true"/><property name="asyncExecutorActivate" value="true"></property><!-- <property name="deploymentResources" value="classpath*:*.bpmn"></property>--><!-- <property name="deploymentMode" value="default"></property>--><!-- <property name="deploymentMode" value="single-resource"></property>--><!-- <property name="deploymentMode" value="resource-parent-folder"></property>--></bean><bean id="processEngine" class="org.flowable.spring.ProcessEngineFactoryBean"><property name="processEngineConfiguration" ref="processEngineConfiguration"/></bean><bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService"/><bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService"/><bean id="taskService" factory-bean="processEngine" factory-method="getTaskService"/><bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService"/><bean id="formService" factory-bean="processEngine" factory-method="getFormService"/><bean id="managementService" factory-bean="processEngine" factory-method="getManagementService"/></beans>