Skip to content

Latest commit

 

History

History
83 lines (54 loc) · 2.66 KB

README.md

File metadata and controls

83 lines (54 loc) · 2.66 KB

Training Spring Cloud

General Links

Project

General dependencies

Producer

Contract

Consumer

Mocks

Create parent project

  1. New parent pom, properties, dependency management, plugin management

Creating the producer

  1. New java module
  2. Create spring boot application with starter web
  3. Create model and simple controller
  4. Add springdoc dependency ui
  5. Add document annotation ui

Creating the contract

  1. New java module
  2. Create spring boot application with wiremock and contract spec
  3. Create custom application to be able to run the generated mock from spring boot jar classpath
  4. Create contracts https://cloud.spring.io/spring-cloud-contract/reference/html/project-features.html#contract-dsl

Creating the client

  1. New java module
  2. Add open feign dependency
  3. Add openapi-generator-maven-plugin (https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator-maven-plugin/README.md)

Creating the consumer

  1. New java module
  2. Create spring boot application
  3. Add client dependency
  4. Add stub runner
  5. Create the tests

Enrich producer tests

  1. Add spring-cloud-contract-maven-plugin
  2. Configure it with basetests