当前位置:网站首页>Develop consumer client as micro service
Develop consumer client as micro service
2022-04-23 22:10:00 【Leon_ Jinhai_ Sun】
# 1. Create a project and introduce consul Client dependency
<!-- introduce consul rely on -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-consul-discovery</artifactId>
</dependency>
# 2. To write properties To configure
server.port=8889
spring.application.name=consulclient8889
spring.cloud.consul.host=localhost # register consul Host of service
spring.cloud.consul.port=8500 # register consul The port number of the service
spring.cloud.consul.discovery.register-health-check=false # close consu The health check of the service [ Not recommended ]
spring.cloud.consul.discovery.service-name=${spring.application.name} # Specify the registered service name The default is the application name
# 3. Start the service to see consul Interface service information
版权声明
本文为[Leon_ Jinhai_ Sun]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/113/202204232157394617.html
边栏推荐
- ERP function_ Financial management_ The difference between red and blue words in invoices
- 清华大学 | WebFace260M:百万级深度人脸识别的基准(TPAMI2022)
- Leetcode 2223 -- sum of total scores of construction string
- 瑞萨IDE:CS+ for CC下载、安装和基础使用
- 微服务系统中服务降级
- OpenFeign组件的使用
- consul client客户端开发
- Oracle intercepts special characters
- JS merge duplicate data in array object
- 服务间通信和RestTemplate完成服务间通信
猜你喜欢
MySQL back to table
Error message: b04access.00f eve'. Read of address 000001B4
Ribbon 服务调用
Hystrix组件
Oracle updates the data of different table structures and fields to another table, and then inserts it into the new table
Beijialai touch screen maintenance 4pp065 0571-X74F
在线Excel转CSV工具
OpenFeign的参数传递之数组和集合类型
延时消息常见实现方案
Display, move, rotate
随机推荐
服务雪崩效应
Handling of alternative solutions for openfeign integration with hystrix
Siemens CNC machine tool maintenance panel 1af5200a2-840a
Convert pictures on OSS to Base64 encoding
OpenFeign之响应处理
不同注册中心区别
Database Experiment four View experiment
Display, move, rotate
MySQL back to table
基于Ribbon的服务调用
MySQL 回表
MySQL 回表
MVC three-tier architecture (illustration)
A method of asynchronous response of application service through load balancing
ERP function_ Financial management_ The difference between red and blue words in invoices
Leaf Smecta
Static keyword and its application
手撕《Google SRE Book》
Idea import a project
Database experiment I database definition and data import