Skip to content

Lab 7: Package by Hexagonal Architecture

Goal

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.welltestedlearning.coffeekiosk.

b. Package Domain Classes

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

c. Package API Adapter Classes

Move all HTTP API related classes to a new package: com.welltestedlearning.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.