我在项目中使用activiti和spring, 以前配置的XML方式如下:
<bean id="repositoryService" factory-bean="processEngine" factory-method="getRepositoryService" />
<bean id="runtimeService" factory-bean="processEngine" factory-method="getRuntimeService" />
<bean id="taskService" factory-bean="processEngine" factory-method="getTaskService" />
<bean id="historyService" factory-bean="processEngine" factory-method="getHistoryService" />
<bean id="managementService" factory-bean="processEngine" factory-method="getManagementService" />
如何配置转换为JAVA?
答案 0 :(得分:1)
类似的东西:
@Autowired
@Bean(name = "repositoryService"
RepositoryService createRepositoryService(ProcessEngine processEngine) {
return processEngine.getRepositoryService();
}