Spring Boot - Fundamentals - Guided Exercise - TaskTrackr – Build a Spring Boot CLI To-Do Manager #185
akash-coded
started this conversation in
Tasks
Replies: 2 comments
-
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This exercise will:
Reinforce core Java concepts (OOP, collections, lambdas)
Show Spring Boot in CLI mode (no REST controllers yet)
Introduce Spring Boot structure, lifecycle,
@Component,@Service, and dependency injection🧪 Exercise: TaskTrackr – Build a Spring Boot CLI To-Do Manager
📖 Project Summary
You’re building TaskTrackr, a simple CLI-based task manager using Spring Boot. You’ll:
Create a Spring Boot CLI app
Add services using
@Componentand@ServiceUse Java concepts like OOP,
ArrayList, lambdasInject dependencies using
@AutowiredBuild step-by-step while understanding how Spring Boot wires everything
🛠 Step-by-Step Instructions
✅ STEP 1: Generate a Spring Boot CLI Project
Go to 👉 https://start.spring.io
Project: Maven
Language: Java
Spring Boot: Keep default (latest stable)
Group:
com.lambdamartArtifact:
tasktrackrName:
tasktrackrDescription:
Spring Boot CLI To-Do ManagerPackaging: Jar
Java: 17+
📦 No dependencies yet!
Unzip and import the project into Eclipse IDE.
🧠 Hidden Pro Tip
✅ STEP 2: Understand the Spring Boot Skeleton
Explore your project:
✍️ Rename the class to
TaskTrackrApp✅ Update the filename and class name accordingly.
✅ STEP 3: Create a Task Class (Java POJO)
📄
Task.java✅ STEP 4: Create a Component to Manage Tasks
📄
TaskService.java💡 Hidden Pro Tip
✅ STEP 5: Autowire the Service into Main App
📄
TaskTrackrApp.java🧠 Shortcut Tip:
🔁 Practice Tasks for Students
🔲 Task 1: Add a method in
TaskServiceto:Search for tasks containing a keyword (case-insensitive)
🔲 Task 2: Modify
listTasks()to show total task count at the end.Use Java streams + lambdas.
🔲 Task 3: Add a method to delete all completed tasks.
🧠 Bonus Challenge
Add sorting feature: completed tasks at bottom
Save and load tasks using a
.txtor.jsonfileAdd a
Categoryfield toTaskand filter by category📘 Spring Boot Concepts Recap
🧾 Deliverables from Students
✅ Working Spring Boot CLI app with:
add,list,done,remove,exit✅ Extra methods for:
searchclearCompletedstats summary✅ Use of:
@Service,@AutowiredList,Stream,removeIf,forEachWant a
Absolutely. Here's a **step-by-step, semi-guided, industry-style Spring Boot exercise** designed to be beginner-friendly, yet packed with **hidden pro tips**, **Java practice**, and **Spring Boot essentials**..docxassignment sheet, Eclipse project starter zip, or auto-check test cases?Let me know and I’ll generate them.
This exercise will:
@Component,@Service, and dependency injection🧪 Exercise: TaskTrackr – Build a Spring Boot CLI To-Do Manager
📖 Project Summary
You’re building TaskTrackr, a simple CLI-based task manager using Spring Boot. You’ll:
@Componentand@ServiceArrayList, lambdas@Autowired🛠 Step-by-Step Instructions
✅ STEP 1: Generate a Spring Boot CLI Project
Go to 👉 https://start.spring.io/
com.lambdamarttasktrackrtasktrackrSpring Boot CLI To-Do Manager📦 No dependencies yet!
Unzip and import the project into Eclipse IDE.
🧠 Hidden Pro Tip
✅ STEP 2: Understand the Spring Boot Skeleton
Explore your project:
✍️ Rename the class to
TaskTrackrApp✅ Update the filename and class name accordingly.
✅ STEP 3: Create a Task Class (Java POJO)
📄
Task.java✅ STEP 4: Create a Component to Manage Tasks
📄
TaskService.java💡 Hidden Pro Tip
✅ STEP 5: Autowire the Service into Main App
📄
TaskTrackrApp.java🧠 Shortcut Tip:
🔁 Practice Tasks for Students
🔲 Task 1: Add a method in
TaskServiceto:🔲 Task 2: Modify
listTasks()to show total task count at the end.Use Java streams + lambdas.
🔲 Task 3: Add a method to delete all completed tasks.
🧠 Bonus Challenge
.txtor.jsonfileCategoryfield toTaskand filter by category📘 Spring Boot Concepts Recap
@SpringBootApplicationTaskTrackrApp@ServiceTaskService@AutowiredTaskServiceCommandLineRunnerTaskclass,ArrayListlistTasks(),markDone()🧾 Deliverables from Students
✅ Working Spring Boot CLI app with:
add,list,done,remove,exit✅ Extra methods for:
searchclearCompletedstats summary✅ Use of:
@Service,@AutowiredList,Stream,removeIf,forEachBeta Was this translation helpful? Give feedback.
All reactions