A practical walkthrough of enforcing software architecture decisions using ArchUnit and the Taikai library in Java/Spring Boot projects. Demonstrates how to write JUnit-based tests that validate layered architecture rules (e.g., controllers must not access repositories directly), naming conventions, banned dependencies like Lombok, configuration property patterns, and exception handling rules. Taikai provides pre-built ArchUnit rules organized by category (Java, Spring, logging, tests, Quarkus), making it easier to onboard teams to architecture testing. Shows how to use check() vs checkAll() for violation reporting, exclude generated code or specific classes from rules, and combine Taikai's predefined rules with custom raw ArchUnit rules.
Sort: