{"id":15778949,"url":"https://github.com/v5tech/spring-cloud-consul-example","last_synced_at":"2025-03-31T15:39:05.074Z","repository":{"id":149461787,"uuid":"72022910","full_name":"v5tech/spring-cloud-consul-example","owner":"v5tech","description":null,"archived":false,"fork":false,"pushed_at":"2016-10-26T16:34:02.000Z","size":3,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-10-11T18:13:38.007Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/v5tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2016-10-26T16:33:35.000Z","updated_at":"2020-06-04T09:30:26.000Z","dependencies_parsed_at":"2023-04-19T03:16:32.477Z","dependency_job_id":null,"html_url":"https://github.com/v5tech/spring-cloud-consul-example","commit_stats":null,"previous_names":["v5tech/spring-cloud-consul-example"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspring-cloud-consul-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspring-cloud-consul-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspring-cloud-consul-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/v5tech%2Fspring-cloud-consul-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/v5tech","download_url":"https://codeload.github.com/v5tech/spring-cloud-consul-example/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246490903,"owners_count":20786077,"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":[],"created_at":"2024-10-04T18:01:39.260Z","updated_at":"2025-03-31T15:39:05.053Z","avatar_url":"https://github.com/v5tech.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# spring-cloud-consul-example\n\n使用`consul`注册服务\n\n### 1. 启动`consul`\n\n```\nconsul agent -dev -ui\n```\n\n### 2. 启动`server`\n\n```\nmvn -f server/pom.xml spring-boot:run\nmvn -f server/pom.xml spring-boot:run\nmvn -f server/pom.xml spring-boot:run\n```\n\n启动三个服务端，客户端会轮询调用这三个服务，注意观察服务端控制台输出\n\n### 3. 启动`client`\n\n```\nmvn -f client/pom.xml spring-boot:run\n```\n\n### 4. 客户端服务调用\n\nhttp://localhost:8080/int\n\n客户端负载均衡轮询调用之前步骤中启动的三个服务端程序，注意观察服务端控制台输出\n\n### 5. consul ui\n\nhttp://localhost:8500/ui\n\n`consul`注册服务控制台\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fspring-cloud-consul-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fv5tech%2Fspring-cloud-consul-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fv5tech%2Fspring-cloud-consul-example/lists"}