{"id":22772352,"url":"https://github.com/pactflow/example-provider-springboot","last_synced_at":"2025-04-15T06:48:25.143Z","repository":{"id":42523492,"uuid":"269018593","full_name":"pactflow/example-provider-springboot","owner":"pactflow","description":"Spring boot example provider","archived":false,"fork":false,"pushed_at":"2025-04-09T05:08:17.000Z","size":277,"stargazers_count":7,"open_issues_count":1,"forks_count":23,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-15T06:48:20.287Z","etag":null,"topics":["example"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pactflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-03T07:24:23.000Z","updated_at":"2025-04-09T05:08:20.000Z","dependencies_parsed_at":"2025-04-09T06:19:58.022Z","dependency_job_id":"e41736d5-aa5d-4bd2-9462-6cabe0348130","html_url":"https://github.com/pactflow/example-provider-springboot","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-springboot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-springboot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-springboot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pactflow%2Fexample-provider-springboot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pactflow","download_url":"https://codeload.github.com/pactflow/example-provider-springboot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249023708,"owners_count":21199958,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["example"],"created_at":"2024-12-11T17:08:13.086Z","updated_at":"2025-04-15T06:48:25.127Z","avatar_url":"https://github.com/pactflow.png","language":"Java","readme":"# Example Java Spring Boot Provider\n\n[![Build](https://github.com/pactflow/example-provider-springboot/actions/workflows/build.yml/badge.svg)](https://github.com/pactflow/example-provider-springboot/actions/workflows/build.yml)\n\n![Can I Deploy](https://testdemo.pactflow.io/pacticipants/pactflow-example-provider-springboot/branches/master/latest-version/can-i-deploy/to-environment/production/badge)\n\nThis is an example of a Java Spring Boot provider that uses Pact, [PactFlow](https://pactflow.io) and GitHub Actions to ensure that it is compatible with the expectations its consumers have of it.\n\nThe project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.\n\nIt is using a public tenant on PactFlow, which you can access [here](https://testdemo.pactflow.io) using the credentials `dXfltyFMgNOFZAxr8io9wJ37iUpY42M`/`O5AIZWxelWbLvqMd8PkAVycBJh2Psyg1`.\n\n## Project Phases\n\nThe project uses a Makefile to simulate a very simple build pipeline with two stages - test and deploy.\n\n- Test\n  - Run tests (including the pact tests that generate the contract)\n  - Publish pacts, tagging the consumer version with the name of the current branch\n  - Check if we are safe to deploy to prod (ie. has the pact content been successfully verified)\n- Deploy (only from master)\n  - Deploy app (just pretend for the purposes of this example!)\n  - Tag the deployed consumer version as 'prod'\n\n## Dependencies\n\n- Docker\n- A [PactFlow](https://pactflow.io) account\n- A [read/write API Token](https://docs.pactflow.io/#configuring-your-api-token) from your PactFlow account\n- Java 8+ installed\n\n## Usage\n\nSee the [PactFlow CI/CD Workshop](https://github.com/pactflow/ci-cd-workshop).\n\n\u003e_Note:_ This repository is designed, out the box to work with the [`example-consumer-java-junit`](https://github.com/pactflow/example-consumer-java-junit) project, which specifies the provider it depends on, as the one named in this repository (`pactflow-example-provider-springboot`). If you are using another consumer example such as the [`pactflow-example-consumer`](https://github.com/pactflow/example-consumer) repo, you should do one of the following in your consumer project, either override the environment variable `PACT_PROVIDER=pactflow-example-provider-springboot` or update [the test](https://github.com/pactflow/example-consumer/blob/master/src/api.pact.spec.js#L9) to specify the correct provider name.\n\nThe below commands are designed for a Linux/OSX environment, please translate for use on Windows/PowerShell as necessary:\n\nPlease ensure the following environment variables have been exported in the process that you run the tests (generally a terminal):\n\n```\nexport PACT_BROKER_TOKEN=\u003cyour pactflow read/write token here\u003e\nexport PACT_BROKER_BASE_URL=https://\u003cyour pactflow subdomain\u003e.pactflow.io\nexport PACT_BROKER_HOST=\u003cyour pactflow subdomain\u003e.pactflow.io\n```\n\nYou can run the tests locally with:\n\n```\nmake test\n```\n\n### Simulating CI\n\nUsually, you would integrate this into a real CI system (such as Buildkite/Jenkins/CircleCI etc., or GitHub Actions as this repository is built against).\n\nYou can simulate a CI process with the following command:\n\n```\nmake fake_ci\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-provider-springboot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpactflow%2Fexample-provider-springboot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpactflow%2Fexample-provider-springboot/lists"}