Convert Spring Batch from 1.1.3 to 2.0.0
I'm trying 开发者_运维百科to convert Spring Batch jobs from version 1.1.3 to 2.0.0 and have gotten numerous errors. Managed to resolve most of these, but not the following: In my QuartzBatchLauncher, the code invokes "new ClassPathXmlApplicationContextJobFactory(bean, path, parent)" and I've had no luck discovering what is the 2.0 equivalent to this class. Appreciate any help pointing me in the right direction. Thanks.
May be, this?
ClassPathXmlApplicationContextFactory f = new ClassPathXmlApplicationContextFactory(new ClassPathResource(path));
f.setApplicationContext(parent);
JobFactory j = new ApplicationContextJobFactory(name, f);
精彩评论