Skip to content

A Sample monolith application Spring Boot WebAppExample where everything is in a single Spring boot project (ui, application, infrastructure, core) communicating through a Pipeline design pattern implementation (PipelinR)

Notifications You must be signed in to change notification settings

dimitris-papadimitriou-chr/Spring-Boot-WebAppExample-Mediator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring Boot WebAppExample Functional

This is a simplistic web application that conforms into a mininal Clean architecture.

Also it uses the vavr.io functional library in order to facilitate a functional style of writing.

public class GetClientCommandHandler implements Command.Handler<GetClientCommand, CompletableFuture<Either<String, Employee>>> {

   Repository<Client,Integer> clients = new MockClientRepository();
   Repository<Employee,Integer> employees = new MockEmployeeRepository();

   @Override
   public CompletableFuture<Either<String, Employee>> handle(GetClientCommand command) {

       return clients
               .getById(command.getClientId())
               .thenApplyAsync(map(Client::getEmployeeId))
               .thenComposeAsync(bind(employees::getById));
   }
}

About

A Sample monolith application Spring Boot WebAppExample where everything is in a single Spring boot project (ui, application, infrastructure, core) communicating through a Pipeline design pattern implementation (PipelinR)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published