SpringCloud-Eureka客户端注册

Eureka客户端注册

客户端的注册

  1. 增加maven依赖
	<dependency>
        <groupId>org.springframework.cloud</groupId>
        <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
    </dependency>
  1. 修改配置文件
    spring.application.name=providerclinet
    server.port=8881
    # 注册到服务端
    eureka.client.service-url.defaultZone=http://euk1.com:7900/eureka/
    
  2. 新版本的不需要在启动类上添加客户端的注解(@EnableEurekaClient)
posted @   搬砖的孟达  阅读(16)  评论(0编辑  收藏  举报  
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· .NET Core 中如何实现缓存的预热?
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?
· 如何调用 DeepSeek 的自然语言处理 API 接口并集成到在线客服系统
· 【译】Visual Studio 中新的强大生产力特性
点击右上角即可分享
微信分享提示