当前位置:网站首页>开发consul 客户端即微服务
开发consul 客户端即微服务
2022-04-23 21:58:00 【Leon_Jinhai_Sun】
# 1.创建项目并引入consul客户端依赖 <!--引入consul依赖-->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>
# 2.编写properties配置server.port=8889
spring.application.name=consulclient8889
spring.cloud.consul.host=localhost #注册consul服务的主机
spring.cloud.consul.port=8500 #注册consul服务的端口号
spring.cloud.consul.discovery.register-health-check=false #关闭consu了服务的健康检查[不推荐]
spring.cloud.consul.discovery.service-name=${spring.application.name} #指定注册的服务名称 默认就是应用名
# 3.启动服务查看consul界面服务信息
版权声明
本文为[Leon_Jinhai_Sun]所创,转载请带上原文链接,感谢
https://blog.csdn.net/leon_jinhai_sun/article/details/124209655
边栏推荐
- C language programming based on loop structure (PTA)
- Handling of alternative solutions for openfeign integration with hystrix
- C winfrom DataGridView click on the column header can not automatically sort the problem
- [leetcode refers to offer 32 - III. print binary tree III from top to bottom (medium)]
- MySQL 回表
- 【SDU Chart Team - Core】SVG属性类设计之枚举
- Opencv application -- jigsaw puzzle
- 服务雪崩效应
- ERP function_ Financial management_ Basic concepts of Finance
- Ensuring the quality of living materials and food safety in Shanghai
猜你喜欢
![[leetcode refers to offer 52. The first common node of two linked lists (simple)]](/img/bc/cd9c6ec29ecfef74940200e196aed3.png)
[leetcode refers to offer 52. The first common node of two linked lists (simple)]

OpenFeign超时设置

Database Experiment 3 data update experiment

openfeign集成Hystrix的备选方案处理

DW basic tutorial (I)

Plato Farm元宇宙IEO上线四大,链上交易颇高

JUnit unit test ---- a good tool for testing a single method

延时消息常见实现方案

NVM introduction, NVM download, installation and use (node version management)

2. Finishing huazi Mianjing -- 2
随机推荐
在线时序流程图制作工具
Database experiment I database definition and data import
Ribbon停止维护
MySQL back to table
When pycharm debugs, view the tensor image of pytorch in the console
Arm architecture assembly instructions, registers and some problems
Unit function expansion
LabVIEW修改应用程序窗口外观
[leetcode refers to offer 32 - III. print binary tree III from top to bottom (medium)]
Google tries to use rust in Chrome
[leetcode refers to offer 42. Maximum sum of continuous subarrays (simple)]
hystrix dashboard的使用
Hystrix components
Code cloud download history version process
Detailed explanation of basic assembly instructions of x86 architecture
ERP function_ Financial management_ The difference between red and blue words in invoices
C list data paging
Common scenes of vector product in image
[※ leetcode refers to offer 48. The longest substring without repeated characters (medium)]
Leaf Smecta