<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>quality-gates on </title>
    <link>/tags/quality-gates/</link>
    <description>Recent content in quality-gates on </description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Mon, 06 Apr 2026 10:00:00 +0800</lastBuildDate><atom:link href="/tags/quality-gates/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Spring Boot 3.5 &#43; Java 25 &#43; Cloud Native 系列（七）：架构质量Quality Gates</title>
      <link>/posts/shop-platform-architecture-quality-gates/</link>
      <pubDate>Mon, 06 Apr 2026 10:00:00 +0800</pubDate>
      
      <guid>/posts/shop-platform-architecture-quality-gates/</guid>
      <description>在这个系列的前几篇文章中，我们看了 Shop Platform 的各个技术层面：API Gateway、BFF 聚合、领域服务、事件驱动、活动引擎。但有一个问题始终没有回答——如何保证 15+ 个服务、多个开发者在长时间演进中不把这些设计搞乱？
靠 Code Review 口头约定往往不够。人总是会犯错，尤其是当 deadline 临近的时候。按我目前的理解，一个更稳妥的办法是：把架构约束尽量变成可自动执行的测试用例。
📦 本文基于的完整项目源码：https://github.com/meirongdev/shop
上一篇：（六）插件化活动引擎
2026-04 实践更新 当前主线仓库里，ArchUnit、WireMock consumer contract tests、@HttpExchange 客户端基线、以及 JWKS 认证链都已经进入可验证状态；本文里的质量Quality Gates思路仍然适用，但哪些Quality Gates“只是方向”、哪些已经落地，请以 main 分支和 docs/ROADMAP-2026.md 为准。
质量Quality Gates全景 Shop Platform 的架构质量保障由三个支柱组成：
┌─────────────────────────────────────────────────────────┐ │ 架构质量Quality Gates │ │ │ │ ① ArchUnit 规则 → 验证已有代码是否符合约定 │ │ (19 条规则) │ │ │ │ ② Maven Archetype → 新服务从标准化骨架出发 │ │ (6 个模板) │ │ │ │ ③ WireMock contract → BFF 与领域服务接口兼容 │ │ (13 个 contract tests) │ └─────────────────────────────────────────────────────────┘ ArchUnit：用代码验证架构 ArchUnit 是一个 Java 库，可以在单元测试中验证类之间的依赖关系、命名约定、注解使用等架构约束。它的核心价值在于：把架构规则变成编译和 CI 中自动执行的测试，而不是文档里容易漂移的约定。</description>
    </item>
    
  </channel>
</rss>
