From f37bdaa9d84895df4e56c7cc0edb1d80a4a2fd7e Mon Sep 17 00:00:00 2001 From: dsyer Date: Fri, 4 Dec 2009 19:14:58 +0000 Subject: [PATCH] Don't use @PostConstruct --- .../batch/core/scope/JobStartupRunner.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/spring-batch-core/src/test/java/org/springframework/batch/core/scope/JobStartupRunner.java b/spring-batch-core/src/test/java/org/springframework/batch/core/scope/JobStartupRunner.java index c02a5ed38..4911c83d5 100644 --- a/spring-batch-core/src/test/java/org/springframework/batch/core/scope/JobStartupRunner.java +++ b/spring-batch-core/src/test/java/org/springframework/batch/core/scope/JobStartupRunner.java @@ -1,12 +1,11 @@ package org.springframework.batch.core.scope; -import javax.annotation.PostConstruct; - import org.springframework.batch.core.JobExecution; import org.springframework.batch.core.Step; import org.springframework.batch.core.StepExecution; +import org.springframework.beans.factory.InitializingBean; -public class JobStartupRunner { +public class JobStartupRunner implements InitializingBean { private Step step; @@ -14,8 +13,7 @@ public class JobStartupRunner { this.step = step; } - @PostConstruct - public void launch() throws Exception { + public void afterPropertiesSet() throws Exception { StepExecution stepExecution = new StepExecution("step", new JobExecution(1L), 0L); step.execute(stepExecution); // expect no errors