模块版本冲突。模块 [groovy-xml 已在版本 4.xx 中加载,而您正在尝试加载版本 3.xx

Gur*_*Cse 8 rest-assured wiremock spring-cloud

我正在努力为 springboot Rest api 设置wiremock,并使用 spring cloud 中的放心和 spring-cloud-starter-contract-stub-runner 。当我运行示例集成测试时,我遇到模块冲突错误

Gur*_*Cse 3

  1. 检查 pom 文件的依赖关系树。错误的原因是您的类路径中有两个版本不同的常规库,这导致了冲突
  2. 一种来自放心依赖,另一种来自 spring-cloud-starter-contract-stub-runner 依赖
  3. 解决方案是删除放心并将其替换为restdocs-api-spec-restassured 依赖项。这样您就可以放心使用,而无需额外的 groovy 依赖。你的类路径将只有 1 个来自 spring-cloud-starter-contract-stub-runner 依赖项的 groovy