This project demonstrates how to create a command-line runner using Spring Boot. It provides a simple template for building command-line applications with the power and convenience of the Spring framework.
- Easy setup with Spring Boot
- Command-line argument parsing
- Customizable business logic
- Dependency injection support
- Java JDK 11 or higher
- Maven 3.6 or higher
-
Clone the repository:
git clone https://github.com/Chandrashekharwagh/spring-boot-commandLine-runner.git
-
Navigate to the project directory:
cd spring-boot-commandLine-runner
-
Build the project:
mvn clean package
-
Run the application:
java -jar target/spring-boot-commandLine-runner-1.0.0.jar [arguments]
The application accepts command-line arguments. Here's an example:
java -jar target/spring-boot-commandLine-runner-1.0.0.jar --name John --action greet
Customize the run
method in the CommandLineRunnerImpl
class to define your application's behavior.
You can configure the application using application.properties
or application.yml
files. Place these in the src/main/resources
directory.
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE.md file for details.