Add listener to persist relationship between job and task
This introduces a listener that stores the association between a Spring Batch job and the task it was executed within. Resolves spring-cloud/spring-cloud-task#46 Merge Changes based on code review.
This commit is contained in:
committed by
Glenn Renfro
parent
bb76cef391
commit
7c8fc5f50e
@@ -1,4 +1,4 @@
|
||||
= Timestamp Job
|
||||
= Timestamp Task
|
||||
|
||||
This is a Spring Cloud Task application that logs a timestamp.
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<parent>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-parent</artifactId>
|
||||
<version>1.3.2.RELEASE</version>
|
||||
<version>1.3.3.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<properties>
|
||||
|
||||
@@ -40,6 +40,8 @@ import org.springframework.context.annotation.Bean;
|
||||
@EnableConfigurationProperties({ TimestampTaskProperties.class })
|
||||
public class TaskApplication {
|
||||
|
||||
private static final Log logger = LogFactory.getLog(TaskApplication.class);
|
||||
|
||||
@Bean
|
||||
public TimestampTask timeStampTask() {
|
||||
return new TimestampTask();
|
||||
@@ -53,7 +55,6 @@ public class TaskApplication {
|
||||
* A commandline runner that prints a timestamp.
|
||||
*/
|
||||
public class TimestampTask implements CommandLineRunner {
|
||||
private final Log logger = LogFactory.getLog(TimestampTask.class);
|
||||
|
||||
@Autowired
|
||||
private TimestampTaskProperties config;
|
||||
|
||||
Reference in New Issue
Block a user