// the find
fuzhengwei/itstack-demo-design
:art: 《重学Java设计模式》是一本互联网真实案例实践书籍。以落地解决方案为核心,从实际业务中抽离出,交易、营销、秒杀、中间件、源码等22个真实场景,来学习设计模式的运用。欢迎关注小傅哥,微信(fustack),公众号:bugstack虫洞栈,博客:https://bugstack.cn
A companion code repo to a Chinese-language book on Java design patterns, grounded in e-commerce scenarios (flash sales, promotions, middleware) rather than toy examples. It's aimed at mid-level Java developers who already know patterns theoretically but haven't applied them under real constraints.
Each pattern gets a before/after pair — the messy ifelse version first, then the refactored one — which makes the tradeoff concrete rather than abstract. The business contexts (coupon dispatch, activity state machines, proxy-based AOP middleware) are plausible enough to be instructive. The SpringBoot proxy pattern module actually implements a custom annotation-driven interceptor, not just a textbook wrapper. The repo is also the source for a printed, peer-reviewed book, so the examples have been edited more carefully than most GitHub tutorial repos.
The repo is effectively frozen — last meaningful commit was 2024, and the book it ties to predates Spring Boot 3 and Java 17+ features like records and sealed classes, so the patterns shown don't reflect how idiomatic modern Java looks. No tests in the pattern modules themselves; the test files are just ApiTest.java main-method runners with sysout, not assertions. The Chinese-only content limits its reach significantly, and there's no English translation in the repo. The multi-module structure is flat and repetitive — 22+ separate Maven modules with near-identical layouts make navigation tedious unless you're following the book chapter by chapter.