跳到主要内容

配置属性

DeepSeek V3 中英对照 Configuration Properties

以下是配置属性的列表。

名称默认描述
spring.cloud.contract.stubrunner.amqp.enabledfalse是否启用对 Stub Runner 和 AMQP 的支持。
spring.cloud.contract.stubrunner.amqp.mockCOnnectiontrue是否启用对 Stub Runner 和 AMQP 模拟连接工厂的支持。
spring.cloud.contract.stubrunner.classifierstubs默认情况下,在 ivy 坐标中用于存根的分类器。
spring.cloud.contract.stubrunner.cloud.consul.enabledtrue是否在 Consul 中启用存根注册。
spring.cloud.contract.stubrunner.cloud.delegate.enabledtrue是否启用 DiscoveryClient 的 Stub Runner 实现。
spring.cloud.contract.stubrunner.cloud.enabledtrue是否启用 Spring Cloud 对 Stub Runner 的支持。
spring.cloud.contract.stubrunner.cloud.eureka.enabledtrue是否在Eureka中启用存根注册。
spring.cloud.contract.stubrunner.cloud.loadbalancer.enabledtrue是否启用 Stub Runner 的 Spring Cloud Load Balancer 集成。
spring.cloud.contract.stubrunner.cloud.stubbed.discovery.enabledtrue是否应为 Stub Runner 存根服务发现。如果设置为 false,存根将在真实的服务发现中注册。
spring.cloud.contract.stubrunner.cloud.zookeeper.enabledtrue是否在 Zookeeper 中启用存根注册。
spring.cloud.contract.stubrunner.consumer-name你可以通过为此参数设置一个值来覆盖此字段的默认 {@code spring.application.name}。
spring.cloud.contract.stubrunner.delete-stubs-after-testtrue如果设置为 {@code false},则运行测试后不会从临时文件夹中删除存根。
spring.cloud.contract.stubrunner.fail-on-no-stubstrue启用此标志后,当未找到存根/契约时,存根运行器将抛出异常。
spring.cloud.contract.stubrunner.generate-stubsfalse启用此标志后,它将指示存根运行器不加载生成的存根,而是在运行时将找到的合约转换为存根格式并运行这些存根。
spring.cloud.contract.stubrunner.http-server-stub-configurerHTTP 服务器存根的配置。
spring.cloud.contract.stubrunner.ids[]以 "ivy" 表示法([groupId]:artifactId:[version]:[classifier][:port])指定要运行的桩模块ID。{@code groupId}、{@code classifier}、{@code version} 和 {@code port} 可以是可选的。
spring.cloud.contract.stubrunner.ids-to-service-ids基于Ivy表示法的ID到应用程序内serviceId的映射。示例:"a:b" → "myService" "artifactId" → "myOtherService"
spring.cloud.contract.stubrunner.integration.enabledtrue是否启用 Stub Runner 与 Spring Integration 的集成。
spring.cloud.contract.stubrunner.jms.enabledtrue是否启用 Stub Runner 与 Spring JMS 的集成。
spring.cloud.contract.stubrunner.kafka.enabledtrue是否启用 Stub Runner 与 Spring Kafka 的集成。
spring.cloud.contract.stubrunner.kafka.initializer.enabledtrue是否允许 Stub Runner 负责轮询消息,而不是由 KafkaStubMessages 组件处理。后者应仅在生产者端使用。
spring.cloud.contract.stubrunner.mappings-output-folder将每个 HTTP 服务器的映射转储到所选文件夹。
spring.cloud.contract.stubrunner.max-port15000自动启动的 WireMock 服务器的端口最大值。
spring.cloud.contract.stubrunner.min-port10000自动启动的 WireMock 服务器端口的最小值。
spring.cloud.contract.stubrunner.password仓库密码。
spring.cloud.contract.stubrunner.properties可以传递给自定义 {@link org.springframework.cloud.contract.stubrunner.StubDownloaderBuilder} 的属性映射。
spring.cloud.contract.stubrunner.proxy-host仓库代理主机。
spring.cloud.contract.stubrunner.proxy-port仓库代理端口。
spring.cloud.contract.stubrunner.server-id
spring.cloud.contract.stubrunner.stream.enabledtrue是否启用 Stub Runner 与 Spring Cloud Stream 的集成。
spring.cloud.contract.stubrunner.stubs-mode选择存根代码的来源。
spring.cloud.contract.stubrunner.stubs-per-consumerfalse是否应该仅为该特定消费者在 HTTP 服务器存根中注册存根。
spring.cloud.contract.stubrunner.username仓库用户名。