A Spring Boot App that contains multiple Spring Cloud Tasks. Where each task logs a timestamp. This also connects to a hsqldb in-memory db to demonstrate writing tasks to a relational database. Note: since it is hsqldb in memory the results will be lost at end of run, but you can use your own database (using boot’s datasource properties).
-
SampleTaskApplication - the Spring Boot Main Application that will execute the SampleC & SampleB CommandLineRunners that are annotated with @Task. It also uses the SampleTaskConfiguration that is annotated with the @EnableTask annotation to initialize the SampleB Bean.
-
MyApp is a boot Main Application that contains a single MyTask CommandLineRunner that is annotated with @Task and the @MyApp is annotated with EnableTask.
-
TimestampTask - the module that writes the log entry as Spring Batch Tasklet