Spring Boot and Java deep dives
Factory Pattern API
Notification and payment APIs that pick an implementation through Spring-managed factories.
View code on GitHubGoals
NotificationSenderFactorychoosing between Email, SMS, Push, and Slack sendersPaymentProcessorFactorychoosing between Credit Card, PayPal, and UPI processors- Unsupported types return a clean error through
GlobalExceptionHandler
Design notes
Each implementation is a Spring bean. The factory collects them into a map keyed by their enum, so adding a channel means adding one class (Slack was added this way after the first pass).
Changelog
- 2026-09-28: Built, then added the Slack channel