读取配置文件
来源:互联网 发布:电影截图拼图软件 编辑:程序博客网 时间:2024/06/06 07:20
1. 使用createProcessEngineConfigurationFromInputStream方法创建ProcessEngineConfiguration
File file = new File("resource/input-stream.xml");
// 得到文件输入流
InputStream fis = new FileInputStream(file);
// 使用createProcessEngineConfigurationFromInputStream方法创建ProcessEngineConfiguration
ProcessEngineConfiguration config = ProcessEngineConfiguration
.createProcessEngineConfigurationFromInputStream(fis);
2.使用Activiti默认的方式创建ProcessEngineConfiguration
ProcessEngineConfiguration config = ProcessEngineConfiguration.createProcessEngineConfigurationFromResourceDefault();
3. 指定配置文件创建ProcessEngineConfiguration
ProcessEngineConfiguration config = ProcessEngineConfiguration
.createProcessEngineConfigurationFromResource("my-activiti1.xml");
4. 启动Activiti
ProcessEngine engine = config.buildProcessEngine();
(会根据这些配置,初始化流程引擎的相关服务和对象,包括数据源,食物,拦截器,服务等)
// 关闭流程引擎
engine.close();
0 0
- 读取配置文件
- 读取 配置文件
- 读取配置文件
- 读取配置文件
- 配置文件读取
- 配置文件读取
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 读取配置文件
- 配置文件读取
- 读取配置文件
- Winpcap的安装使用方法和问题总结
- 随心所欲 +-START-+fIiIhEY/P3c6iTp7OneJe0FERDpzf30/1A==+-END-+ 顺其自然
- repositoryService 流程存储服务组件
- pull解析XListView上拉加载下拉刷新
- 匿名内部类
- 读取配置文件
- 51NOD1525重组公司(并差集)
- 前端工具学习记录
- Vertica的这些事<七>—— Vertica中实现Oracle中的ws_concat功能
- git分布式版本控制软件
- 解析数据出错的分析
- identityService 身份
- 搭建ubuntu环境时遇到的问题及解决方法
- CentOS NodeJS PhantomJS PhearJS 失败的尝试……