In this tutorial, you will learn what the Command-Line Runner is and how can you use it in Spring Boot. The Command-Line Runner is a functional interface that is used to indicate that a bean should run when it is contained within a Spring Application.
What this does for you is give you a "hook" into a Spring Boot application to bootstrap your application or load some initial data. In this demo, you are going to learn how to use the Command Line runner in Spring boot to add some initial data to a database.
When you have completed this tutorial you should understand:
✅ What is the Spring Boot Command Line Runner
✅ How to implement the Command Line Interface in Spring Boot
✅ Override the run method
✅ How to create multiple Command-Line Runners in Spring Boot
✅ Configure the order of each Command-Line Runner
✅ Use the Command Line Runner as a functional interface
🔗Resources & Links mentioned in this video:
Command Line Runner Blog Post
https://danvega.dev/blog/2017/04/07/s...
👋🏻Connect with me:
Website: https://www.danvega.dev
Twitter: / therealdanvega
Github: https://github.com/danvega
Instagram: / thedanvega
LinkedIn: / danvega
Coffee & Code: https://www.danvega/dev/newsletter
SUBSCRIBE TO MY CHANNEL: http://bit.ly/2re4GH0 ❤️