Flask接口签名sign原理与实例代码浅析
352
2022-12-12
Activiti开发环境的搭建过程详解
本文中使用maven+eclipse搭建activiti-5.14的开发环境
一、创建maven工程
创建一个普通的java工程,pom文件的内容如下
xmlns:xsi="http://w3.org/2001/kBfOkXMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://w3.org/2001/kBfOkXMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
二、添加activiti的配置文件
在工程的resources目录下创建activiti的配置文件,名称为activiti.cfg.xml
xmlns:context="http://springframework.org/schema/context"
xmlns:tx="http://springframework.org/schema/tx"
xmlns:xsi="http://w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://springframework.org/schema/beans http://springframework.org/schema/beans/spring-beans.xsd
http://springframework.org/schema/context http://springframework.org/schema/context/spring-context-2.5.xsd
http://springframework.org/schema/tx http://springframework.org/schema/tx/spring-tx-3.0.xsd">
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
xmlns:context="http://springframework.org/schema/context"
xmlns:tx="http://springframework.org/schema/tx"
xmlns:xsi="http://w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://springframework.org/schema/beans http://springframework.org/schema/beans/spring-beans.xsd
http://springframework.org/schema/context http://springframework.org/schema/context/spring-context-2.5.xsd
http://springframework.org/schema/tx http://springframework.org/schema/tx/spring-tx-3.0.xsd">
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
class="org.activiti.engine.impl.cfg.StandaloneProcessEngineConfiguration">
三、测试
新建一个测试类,添加如下代码,
public class Test1 {
/**
* 测试环境是否可用
*/
@Test
public void test1() {
ProcessEngineConfiguration configuration = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault();
System.out.println(configuration);
}
}
运行测试方法test1,如果正常执行,并输出ProcessEngineConfiguration对象的地址,则表示开发环境搭建成功。
四、总结
用maven搭建activiti的开发环境,需要先引入activiti的依赖
因为要操作数据库,所以需要引入msql的驱动和数据库连接池
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~