Skip to content

Lab 8: Package by Hexagonal Architecture

Goals

Apply Hexagonal Architecture packaging to the existing codebase.

a. Application Stays

Leave the CoffeeKioskApplication class in the root package where it currently is, i.e., in com.tedmyoung.coffeekiosk.

b. Package Domain Classes

Move all domain classes to a new package: com.tedmyoung.coffeekiosk.domain.

c. Package API Adapter Classes

Move all HTTP API related classes to a new package: com.tedmyoung.coffeekiosk.adapter.in.api. Make sure to move related test classes to this new package as well.

d. All Tests Pass

Make sure that everything continues to compile and all tests continue to pass.