Spring
為何選擇 Spring
概覽 微服務 響應式 事件驅動 雲 Web 應用程式 無伺服器 批處理
學習
概覽 快速入門 指南 部落格
專案
概覽 Spring Boot Spring Framework Spring Cloud Spring Cloud Data Flow Spring Data Spring Integration Spring Batch Spring Security 檢視所有專案
  • 開發工具
  • Spring Tools 4 Spring Initializr
    學院
    課程 獲取認證
    解決方案
    概覽 Spring Runtime Spring Consulting Spring Academy For Teams 安全公告
    社群
    概覽 活動 團隊
    spring-cloud-contract 4.2.1
      • Spring Cloud Contract 參考文件
      • 法律資訊
      • 入門
        • Spring Cloud Contract 簡介
        • 三秒鐘快速導覽
        • 開發您的第一個基於 Spring Cloud Contract 的應用程式
        • 消費者驅動契約 (CDC) 分步指南,契約位於生產者端
        • 後續步驟
      • 使用 Spring Cloud Contract
        • 使用 Nexus 或 Artifactory 中的樁進行提供者契約測試
        • 使用 Git 中的樁進行提供者契約測試
        • 消費者驅動契約,契約位於生產者端
        • 消費者驅動契約,契約位於外部倉庫
        • 消費者驅動契約,契約位於生產者端並推送到 Git
        • 使用 Artifactory 中的樁對非 Spring 應用程式進行提供者契約測試
        • 在非 JVM 環境下使用 Artifactory 中的樁進行提供者契約測試
        • 使用 REST Docs 和 Nexus 或 Artifactory 中的樁進行提供者契約測試
      • Spring Cloud Contract 特性
        • 契約 DSL
          • 通用頂級元素
          • 動態屬性
        • Spring Cloud Contract 整合
          • JAX-RS
          • WebFlux with WebTestClient
          • WebFlux 顯式模式
          • 自定義模式
          • 處理 Context Path
          • 處理 REST Docs
          • GraphQL
          • GRPC
        • 訊息傳遞
        • Spring Cloud Contract 樁執行器
          • Snapshot 版本
          • 將樁釋出為 JAR 包
          • 樁執行器核心
          • 樁執行器 JUnit Rule 和 樁執行器 JUnit5 Extension
          • 樁執行器 Spring Cloud
          • 使用 樁執行器 Boot 應用程式
          • 消費者驅動契約:每個消費者對應一個樁
          • 從某個位置獲取樁或契約定義
          • 在執行時生成樁
          • 無樁時失敗
          • 通用屬性
        • Spring Cloud Contract WireMock
      • 構建工具
        • Docker 專案
        • Gradle 專案
        • Maven 專案
      • “操作指南”
        • 為何使用 Spring Cloud Contract?
        • 如何使用 Groovy 以外的語言編寫契約?
        • 如何為契約提供動態值?
        • 如何進行樁版本控制?
        • 如何使用一個公共倉庫儲存契約,而不是將其與生產者一起儲存?
        • 如何使用 Git 作為契約和樁的儲存?
        • 如何除錯生成的測試客戶端傳送的請求/響應?
        • 如何除錯 WireMock 傳送的對映、請求或響應?
        • 如何檢視 HTTP 伺服器樁中註冊了哪些內容?
        • 如何引用檔案中的文字?
        • 如何從 Spring Cloud Contract 契約生成 YAML 或 X 檔案?
        • 如何處理傳遞依賴?
        • 如何從契約生成 Spring REST Docs 片段?
        • 如何從某個位置使用樁
        • 如何在執行時生成樁
        • 如果不存在契約或樁,如何讓構建透過?
        • 如何標記契約正在進行中?
      • Spring Cloud Contract 定製
        • DSL 定製
        • WireMock 定製
        • 使用可插拔架構
      • 通用應用程式屬性
        • 如何構建 Spring Cloud Contract
        • 配置屬性
        • YML 模式
    編輯本頁 GitHub 專案 Stack Overflow
    • spring-cloud-contract
    • “操作指南”
    • 如何在執行時生成樁

    如何在執行時生成樁

    如果您想在執行時為契約生成樁,請切換 `@AutoConfigureStubRunner` 註解中的 `generateStubs` 屬性,或者呼叫 JUnit Rule 或 Extension 上的 `withGenerateStubs(true)` 方法。您可以在文件的本節中閱讀更多相關內容。

    如何從某個位置使用樁 如果不存在契約或樁,如何讓構建透過?
    • spring-cloud-contract
      • 4.3.0-SNAPSHOT
      • 4.3.0-RC1
      • 4.2.1當前
      • 4.1.6-SNAPSHOT
      • 4.1.5
    • 相關 Spring 文件
      • Spring Boot
      • Spring Framework
      • Spring Cloud
        • Spring Cloud Build
        • Spring Cloud Bus
        • Spring Cloud Circuit Breaker
        • Spring Cloud Commons
        • Spring Cloud Config
        • Spring Cloud Consul
        • Spring Cloud Contract
        • Spring Cloud Function
        • Spring Cloud Gateway
        • Spring Cloud Kubernetes
        • Spring Cloud Netflix
        • Spring Cloud OpenFeign
        • Spring Cloud Stream
        • Spring Cloud Task
        • Spring Cloud Vault
        • Spring Cloud Zookeeper
      • Spring Data
        • Spring Data Cassandra
        • Spring Data Commons
        • Spring Data Couchbase
        • Spring Data Elasticsearch
        • Spring Data JPA
        • Spring Data KeyValue
        • Spring Data LDAP
        • Spring Data MongoDB
        • Spring Data Neo4j
        • Spring Data Redis
        • Spring Data JDBC & R2DBC
        • Spring Data REST
      • Spring Integration
      • Spring Batch
      • Spring Security
        • Spring Authorization Server
        • Spring LDAP
        • Spring Security Kerberos
        • Spring Session
        • Spring Vault
      • Spring AI
      • Spring AMQP
      • Spring CLI
      • Spring GraphQL
      • Spring for Apache Kafka
      • Spring Modulith
      • Spring for Apache Pulsar
      • Spring Shell
    • 所有文件...
    Spring

    Copyright © 2005 -Broadcom. All Rights Reserved. The term "Broadcom" refers to Broadcom Inc. and/or its subsidiaries.
    使用條款 • 隱私 • 商標指南 • 致謝 • 您的加州隱私權 • Cookie 設定

    Apache®, Apache Tomcat®, Apache Kafka®, Apache Cassandra™, and Apache Geode™ are trademarks or registered trademarks of the Apache Software Foundation in the United States and/or other countries. Java™, Java™ SE, Java™ EE, and OpenJDK™ are trademarks of Oracle and/or its affiliates. Kubernetes® is a registered trademark of the Linux Foundation in the United States and other countries. Linux® is the registered trademark of Linus Torvalds in the United States and other countries. Windows® and Microsoft® Azure are registered trademarks of Microsoft Corporation. “AWS” and “Amazon Web Services” are trademarks or registered trademarks of Amazon.com Inc. or its affiliates. All other trademarks and copyrights are property of their respective owners and are only mentioned for informative purposes. Other names may be trademarks of their respective owners.

    在所有 Spring 文件中搜索