Recent Posts (java)
Spring Boot Chain of Responsibility Pattern Example
- By Ercan
- 26/09/2025
- 0 comments
The Chain of Responsibility is a behavioral design pattern that allows us to process a request through a sequence of handlers. Each handler decides whether it can process the request or pass it along to the next handler in the chain. In this article, we will demonstrate how this pattern can be applied in a Spring Boot application to resolve which hashing algorithm was used for a given hash. Problem to Solve Given a plain text string and its hashed value, we want to determine which algorithm (MD5, SHA1, SHA256, etc.) generated the hash. The API Our project provides a simple A..
Spring Boot Strategy Pattern Example
- By Ercan
- 25/09/2025
- 0 comments
Design patterns are one of the most valuable tools in a developer’s toolkit. They provide proven solutions to recurring design problems and help us write code that is maintainable, flexible, and easy to extend. One of the most practical patterns in everyday software development is the Strategy Pattern. In this article, we’ll look at how the Strategy Pattern can be applied in a real-world example using Spring Boot. We will build a simple REST API that takes a piece of text and returns its hash, depending on the algorithm selected by the client. The project is a minimal but effective demonstr..