The spring-batch-admin project provides an html web application for managing and monitoring Spring Batch jobs. The application consists of a customizable web UI using Spring MVC and a Java service API.
This is a fork of the Spring Batch Admin project which has been significantly restructured and simplified to provide only the controllers related to spring batch jobs, executions and steps and to only provide html responses from the controllers. Some of the features removed include…
-
json apis
-
hateos
-
rss
-
spring-integration functionality
-
The ability to upload batch jobs
-
xml configuration. All configuration is now java based.
The following section is a quick start guide for embedding Spring Batch Admin into a spring boot application that contains spring batch jobs.
Spring Batch Admin requires the following beans to be created within your project…
-
JobRepository
-
DataSource
-
JobExplorer
-
JobRegistry
-
PlatformTransactionManager
These beans will be created by the @EnableBatchProcessing annotation
The following dependency has to be added to your project.
<dependency>
<groupId>au.com.cyberavenue</groupId>
<artifactId>spring-batch-admin</artifactId>
<version>${spring-batch-admin.version}</version>
</dependency>
In order to enable the Spring Batch Admin console, the annotation @EnableSpringBatchAdmin has to be added to one of the @Configuration classes.
@EnableBatchProcessing
@EnableSpringBatchAdmin
@SpringBootApplication
public class SpringBatchAdminApplication {
}
If you run your spring boot application, you should be able to view the Spring Batch Admin console by navigating to <context_path>/jobs in your web browser.