ArchUnit: Guarding the Logic of Your Application
summary
ArchUnit enforces concrete architectural rules by expressing them as JUnit 5 tests (core + API), scanning packages to forbid controller->repository jumps, detect cycles, require logger fields to be private static final with specific names, and prohibit business logic in DTOs. Demo runs on Maven show failing tests (misnamed loggers and package suffixes), edits to code make tests pass. Rules are packaged as a reusable Java library and published to Nexus so projects import them incrementally. ArchUnit tests as first-class unit tests shared rules library distributed via Maven/Nexus
AI-written summary · about
chapters (11)
- 0:00Introduction and speaker intro
- 1:50Speaker background and motivation
- 3:35Common architecture problems in microservices
- 9:44Formal approaches to standardization
- 14:06ArchUnit vs other validation tools
- 17:00Defining architecture rules with ArchUnit
- 24:10Live demo of ArchUnit implementation
- 31:28Rule validation for controllers and loggers
- 34:02Distributing rules via shared library
- 38:47Best practices for ArchUnit adoption
- 41:15Summary and Q&A teaser
related talks
52mArchUnit - Unit Testing Architecture and Design
24mUnit Testing Your Architecture
45mUnit Test Your Java Architecture With ArchUnit
22mArchitecture & ArchUnit
43mUnit Test Your Java Architecture With ArchUnit
42mArchitecture testing with ArchUnit: Implementation for DDD
46mEnforcing Architecture in Legacy Systems
01h 34mThe Intersection of Architecture and Implementation
