【问题标题】:Spring Boot minimum version requirement for Spring Cloud Contract to work ?Spring Cloud Contract 工作的 Spring Boot 最低版本要求?
【发布时间】:2017-01-17 04:04:29
【问题描述】:

我在我的客户端应用程序中使用最新的 Spring Boot 1.3,我想介绍 Spring Cloud Contract:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.8.RELEASE</version>
    <relativePath/>
    <!-- lookup parent from repository -->
</parent>

我能够从生产者端生成存根,但从消费者端,我无法调整https://cloud.spring.io/spring-cloud-contract/ 上给出的示例。

我正在用 SpringJUnit4ClassRunner 替换测试运行器 SpringRunner(Spring Boot 1.3 不可用),但 @AutoConfigureStubRunner 注释似乎被忽略了。

我在 Spring Cloud Contract 页面中没有看到对 Spring Boot 版本的任何要求:有吗?

【问题讨论】:

    标签: spring-boot spring-cloud-contract


    【解决方案1】:

    根据我的经验,似乎需要 Spring Boot 1.4+。升级后

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.4.3.RELEASE</version>
        <relativePath/>
        <!-- lookup parent from repository -->
    </parent>
    

    我看到@AutoConfigureStubRunner 被考虑在内。

    【讨论】:

      猜你喜欢
      • 2021-04-04
      • 1970-01-01
      • 2022-10-17
      • 2017-01-09
      • 2021-12-16
      • 2018-12-27
      • 2015-09-20
      • 2020-10-24
      • 1970-01-01
      相关资源
      最近更新 更多