这是简单版本
后续有spring整合版本再更新
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/contex http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd">
<!--activiti单独运行的ProcessEngine配置对象(processEngineConfiguration),使用单独启动方式
默认情况下:bean的id=processEngineConfiguration
-->
<!--<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">-->
<!--<property name="jdbcDriver" value="com.mysql.jdbc.Driver"></property>-->
<!--<property name="jdbcUrl" value="jdbc:mysql://192.168.2.177:3306/activiti?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"></property>-->
<!--<property name="jdbcUsername" value="root"></property>-->
<!--<property name="jdbcPassword" value="root"></property>-->
<!--<!–数据库生成策略–>-->
<!--<!–activiti在生成表的时候,true 表示数据库中如果已经存在,那么直接使用,如果不存在,则直接创建–>-->
<!--<property name="databaseSchemaUpdate" value="true"></property>-->
<!--</bean>-->
<!--数据库连接池的构造注入-->
<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver"></property>
<property name="url" value="jdbc:mysql://127.0.0.1:3306/activiti?useUnicode=true&characterEncoding=utf8&useSSL=false&serverTimezone=GMT%2B8"></property>
<property name="username" value="root"></property>
<property name="password" value="root"></property>
<property name="maxActive" value="30"></property>
<property name="minIdle" value="5"></property>
</bean>
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<!--代表数据源-->
<property name="dataSource" ref="dataSource"></property>
<!--代表是否生成表结构-->
<property name="databaseSchemaUpdate" value="true"/>
</bean>
</beans>