日期:2014-05-16 浏览次数:20800 次
1.下载activiti-5.3??? www.activiti.org 2.C:\activiti-5.3\activiti-5.3\setup??? ??? 修改build.properties??? db=mysql ??? 修改build.mysql ?????????? db=mysql ??? 运行ant db.create 2.新建项目,把C:\activiti-5.3\activiti-5.3\workspace\activiti-spring-examples拷贝到项目中 ??? 如果运行了ant demo.setup? 在这个目录下会有libs-runtime libs-test 把相关类库添加到项目中 3.修改activiti-context.xml ???? <?xml version="1.0" encoding="UTF-8"?>
?????????? jdbc.driver=com.mysql.jdbc.Driver
?????????? jdbc.url=jdbc:mysql://localhost:3306/activiti?autoReconnect=true
?????????? jdbc.username=activiti
??????????? jdbc.password=activiti
<beans xmlns="http://www.springframework.org/schema/beans"?
?????? xmlns:context="http://www.springframework.org/schema/context"
?????? xmlns:tx="http://www.springframework.org/schema/tx"
?????? 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
?????????????????????????? http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-2.5.xsd
?????????????????????????? http://www.springframework.org/schema/tx????? http://www.springframework.org/schema/tx/spring-tx-3.0.xsd">
? <bean id="dataSource" class="org.springframework.jdbc.datasource.SimpleDriverDataSource">
??? <property name="driverClass" value="com.mysql.jdbc.Driver" />
??? <property name="url" value="jdbc:mysql://localhost:3306/activiti?autoReconnect=true" />
??? <property name="username" value="activiti" />
??? <property name="password" value="activiti" />
? </bean>
??
? <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
??? <property name="dataSource" ref="dataSource" />
? </bean>
??
? <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
?? ?? <property name="dataSource" ref="dataSource"/>
?? ?? <property name="persistenceXmlLocation">
??? ??? ? <value>classpath:custom-persistence.xml</value>
????? </property>
?? ?? <property name="jpaVendorAdapter">
?? ??? ?? <bean class="org.springframework.orm.jpa.vendor.OpenJpaVendorAdapter">
?? ??? ??? ?? <property name="database