.在resources 创建activiti.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">
<bean id="processEngineConfiguration" class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
<property name="databaseType" value="mysql"></property>
<property name="jdbcUrl" value="jdbc:mysql://localhost:3306/5180it20210518?nullCatalogMeansCurrent=true&useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8"></property>
<property name="jdbcDriver" value="com.mysql.jdbc.Driver"></property>
<property name="jdbcUsername" value="root"></property>
<property name="jdbcPassword" value="xxx"></property>
</bean>
</beans>
使用DbSchemaCreate类用来创建数据库
/**
* https://zhengjianfeng.cn/?p=167
* @author liusheng
*
*/
public class DBCreate {
public static void main(String[] cmd) {
DbSchemaCreate.main(cmd);
}
}
如果java.sql.SQLSyntaxErrorException: Table 'test.ACT_GE_PROPERTY' doesn't exist
在url后面加上nullCatalogMeansCurrent=true
网上看这个也能创建表结构
执行下面创建表接口
参考
https://blog.csdn.net/czx2018/article/details/88526256
当前共有 0 条评论