首先创建activiti表
方式1、用代码创建
package createtable;
import org.activiti.engine.ProcessEngineConfiguration;
import org.junit.Test;
public class CreateActivitiTable {
@Test
public void createTable() {
ProcessEngineConfiguration processEngineConfiguration = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration();
processEngineConfiguration.setJdbcDriver("com.mysql.jdbc.Driver");
processEngineConfiguration.setJdbcUrl("jdbc:mysql://localhost:3306/activiti?useUnicode=true&characterEncoding=utf-8");
processEngineConfiguration.setJdbcUsername("root");
processEngineConfiguration.setJdbcPassword("root");
processEngineConfiguration.setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE);
processEngineConfiguration.buildProcessEngine();
}
}
方式2、直接从下载包中找到相应sql文件导入即可
项目下载地址:http://files.cnblogs.com/files/walk-the-Line/springmvc.activiti5.15.1.zip
springMvc4+hibernate4+activiti5.15(Maven)
原文:http://www.cnblogs.com/walk-the-Line/p/4919033.html