Survive by day and develop by night.
talk for import biz , show your perfect code,full busy,skip hardness,make a better result,wait for change,challenge Survive.
happy for hardess to solve denpendies.

@Configuration
public class ApplicationProcessAutoConfiguration {
@Bean
public ApplicationEntryDiscovery processEntryDiscovery() {
return new ProcessEntryDiscovery();
}
@Bean
public ApplicationEntryDeployer processEntryDeployer(RepositoryService repositoryService) {
return new ProcessEntryDeployer(repositoryService);
}
}
public class ProcessEntryDeployer implements ApplicationEntryDeployer {
private RepositoryService repositoryService;
public ProcessEntryDeployer(RepositoryService repositoryService) {
this.repositoryService = repositoryService;
}
@Override
public void deployEntries(ApplicationContent application) {
List<FileContent> processContents = application.getFileContents(ProcessEntryDiscovery.PROCESSES);
DeploymentBuilder deploymentBuilder = repositoryService.createDeployment().enableDuplicateFiltering().name("ApplicationAutoDeployment");
for (FileContent processContent : processContents) {
deploymentBuilder.addBytes(processContent.getName(), processContent.getContent());
}
deploymentBuilder.deploy();
}
}
public class ProcessEntryDiscovery implements ApplicationEntryDiscovery {
public static final String PROCESSES = "processes";
@Override
public Predicate<ZipEntry> filter(ZipEntry entry) {
return zipEntry -> !zipEntry.isDirectory() && zipEntry.getName().contains(PROCESSES);
}
@Override
public String getEntryType() {
return PROCESSES;
}
}
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
org.activiti.application.conf.ApplicationProcessAutoConfiguration
无
暂无
欢迎阅读,各位老铁,如果对你有帮助,点个赞加个关注呗!~