在mysql中建立數據庫名字叫 'activiti' java
執行D:\activiti-5.21.0\database\create下的腳本mysql
打開=> apache-tomcat/webapps/activiti-explorer/WEB-INF/classes/
db.properties
修改配置文件 db.properties
db=activiti
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activiti
jdbc.username=root
jdbc.password=root web
若是是第三方程序,則修改activiti.cfg.xmlspring
<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="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration"> <property name="jdbcUrl" value="jdbc:mysql://localhost:3307/activiti?autoReconnect=true" /> <property name="jdbcDriver" value="com.mysql.jdbc.Driver" /> <property name="jdbcUsername" value="root" /> <property name="jdbcPassword" value="" /> <property name="databaseSchemaUpdate" value="true" /> <property name="jobExecutorActivate" value="false" /> <property name="asyncExecutorEnabled" value="true" /> <property name="asyncExecutorActivate" value="false" /> <property name="mailServerHost" value="mail.my-corp.com" /> <property name="mailServerPort" value="5025" /> <!-- <property name="eventListeners"> --> <!-- <list> --> <!-- <bean class="activitiLearn.MyEventListener" /> --> <!-- </list> --> <!-- </property> --> </bean> </beans>
打開=>apache-tomcat-7.0.27/webapps/activiti-rest/WEB-INF/classes/
db.properties
修改配置文件 db.properties
db=activiti
jdbc.driver=com.mysql.jdbc.Driver
jdbc.url=jdbc:mysql://localhost:3306/activiti
jdbc.username=root
jdbc.password=root sql
配置POM:數據庫
<dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <version>5.1.30</version> </dependency>
非Maven環境則把 mysql-connector-java-5.1.18-bin.jar 複製到 lib下
apache
把 mysql-connector-java-5.1.18-bin.jar 複製到 lib下
=>apache-tomcat-7.0.27/webapps/activiti-rest/WEB-INF/lib
tomcat
最後重啓tomcat server和 檢驗activiti 數據庫.看錶是否配置OKapp
執行一下第三節的程序,發現數據已經能保存到mysqlwebapp