This project demonstrates how to use Spring Cloud Task to create and manage short-lived microservices for batch processing and other tasks.
Spring Cloud Task provides a framework for creating and executing short-lived microservices as tasks within a Spring Boot application. These tasks are typically used for batch processing, data migration, or other short-lived operations.
In this demo, we'll showcase how to create a simple Spring Cloud Task application and execute it using Spring Boot.
- Creation of a Spring Cloud Task application
- Configuration of task properties and execution parameters
- Monitoring and management of tasks using Spring Boot Admin or Actuator
src/main/java
: Contains the Java source code for the Spring Boot application.src/main/resources
: Contains configuration files and static resources.pom.xml
: Maven project configuration file.
- Clone the repository:
git clone https://github.com/iammahesh123/spring-cloud-task-demo.git
- Navigate to the project directory:
cd spring-security-csrf-demo
- Build the project using Maven:
mvn clean package
- Run the application:
mvn run
- Access the application in your web browser: http://localhost:8080
- Execute the task(s) defined in the application and observe the results.
- application.properties: Contains application-specific configurations.
- TaskConfiguration.java: Spring Configuration class where Spring Cloud Task properties and beans are defined.
- Java 8 or higher
- Spring Boot
- Spring Cloud Task
Contributions are welcome. Please fork the repository, make your changes, and submit a pull request.
This project is licensed under the MIT License.