Strategy Design Pattern For a detailed explanation please refer to my blog post Implementing the Strategy Design Pattern in Spring Boot