Рет қаралды 494
Hey there! When you build a RESTful API, you might have to expose long-running tasks, i.e., sending a batch of emails. In these scenarios, you don't want to block client requests until the job has finished. Plus, you might want to report back some details on the progress of the task and a way to cancel an already started task.
In this tutorial, we'll talk about implementing long-running tasks as first-class citizens in our API.
⛩️ Navigation
00:00 - Intro
00:30 - Let's Code
01:57 - Adding the Task + Operation Resources
03:55 - Adding the Task Service
05:21 - Adding Event Handling
07:03 - Adding Tasks Lifecycle Management
10:24 - Adding the Task Controller
🍃 Code & Resources
Grab the code for this tutorial here axgr.dev/posts/spring-api-tas...
🙌 Get in Touch
Join my newsletter and say hi here axgr.dev/newsletter/?...
🎙 Gear & Links
Mechanical Keyboard: x.axgr.dev/keyboard
Studio Camera: x.axgr.dev/studio-camera
Studio Lens: x.axgr.dev/studio-lens
Studio Mic: x.axgr.dev/studio-mic
Vlog Camera: x.axgr.dev/vlog-camera
Vlog Lens: x.axgr.dev/vlog-lens
All my affiliate links axgr.dev/deals/?...
I may earn a small commission for purchases made through the links above at no additional cost to you.
🎶 Music
Background music by / @kainbeats
🍿 Subscribe
Want to see more tech tutorials? Subscribe now!