@SuppressWarnings("cast") @Test public void testOrderedImplemented() throws Exception { assertTrue(registrar instanceof Ordered); assertEquals(Ordered.LOWEST_PRECEDENCE, registrar.getOrder()); registrar.setOrder(1); assertEquals(1, registrar.getOrder()); }
@PostConstruct public void initialize() throws Exception { // Default order for the AutomaticJobRegistrar is Ordered.LOWEST_PRECEDENCE. Since we want to register // listeners after the jobs are registered through the AutomaticJobRegistrar, we need to decrement its // order value by one. The creation of the AutomaticJobRegistrar bean is hidden deep in the automatic // batch configuration, so we unfortunately have to do it here. automaticJobRegistrar.setOrder(Ordered.LOWEST_PRECEDENCE - 1); addApplicationContextFactories(automaticJobRegistrar); }
@PostConstruct public void initialize() throws Exception { // Default order for the AutomaticJobRegistrar is Ordered.LOWEST_PRECEDENCE. Since we want to register // listeners after the jobs are registered through the AutomaticJobRegistrar, we need to decrement its // order value by one. The creation of the AutomaticJobRegistrar bean is hidden deep in the automatic // batch configuration, so we unfortunately have to do it here. automaticJobRegistrar.setOrder(Ordered.LOWEST_PRECEDENCE - 1); addApplicationContextFactories(automaticJobRegistrar); }
@PostConstruct public void initialize() throws Exception { // Default order for the AutomaticJobRegistrar is Ordered.LOWEST_PRECEDENCE. Since we want to register // listeners after the jobs are registered through the AutomaticJobRegistrar, we need to decrement its // order value by one. The creation of the AutomaticJobRegistrar bean is hidden deep in the automatic // batch configuration, so we unfortunately have to do it here. automaticJobRegistrar.setOrder(Ordered.LOWEST_PRECEDENCE - 1); addApplicationContextFactories(automaticJobRegistrar); }