SpringCloud 添加Maven插件
2023-12-08 17:45 更新
以类似以下方式添加Spring Cloud Contract BOM:
<dependencyManagement> <dependencies> <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-dependencies</artifactId> <version>${spring-cloud-release.version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement>
接下来,添加Spring Cloud Contract Verifier
Maven插件:
<plugin> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-contract-maven-plugin</artifactId> <version>${spring-cloud-contract.version}</version> <extensions>true</extensions> <configuration> <packageWithBaseClasses>com.example.fraud</packageWithBaseClasses> <convertToYaml>true</convertToYaml> </configuration> </plugin>
您可以在
Spring Cloud Contract Maven插件文档(2.0.0.RELEASE
版本的示例)中了解更多信息。
以上内容是否对您有帮助:
更多建议: