christophknabe / spring-ddd-bank

A sample project following Domain Driven Design with Spring Data JPA
GNU Lesser General Public License v2.1
509 stars 125 forks source link

Specification Pattern demo #29

Open Veitor opened 1 year ago

Veitor commented 1 year ago

I am curious about how to combine the Specification Pattern with the Repository Pattern. I hope the author can show a demo in the future.

christophknabe commented 1 year ago

Thanks for the proposal. The evident cadidates for this pattern are the methods findYoungClients and findRichClients in the class domain.BankService. Only I fear the introduction of an additional pattern would complicate this example project. In any case I am now too occupied to think about it profoundly. But feel free to make a pull request with a solution proposal. Literature: https://www.martinfowler.com/apsupp/spec.pdf