• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
毛逢芳
博客园    首页    新随笔    联系   管理    订阅  订阅
10 2020 档案
Eureka-动态获取路径

摘要:1、在启动类上添加@EnableDiscoveryClient注解 2、注入并调用方法 @Autowiredprivate DiscoveryClient discoveryClient; List<ServiceInstance> instances = discoveryClient.getIn 阅读全文
posted @ 2020-10-26 23:07 那棵tree看起来生气了 阅读(205) 评论(0) 推荐(0)
Eureka-client搭建

摘要:1、导入坐标<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency>2、启动类注 阅读全文
posted @ 2020-10-26 22:41 那棵tree看起来生气了 阅读(178) 评论(0) 推荐(0)
Eureka-server搭建(入门)

摘要:1、导入坐标<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-netflix-eureka-server</artifactId> <version>Greenwich 阅读全文
posted @ 2020-10-26 21:19 那棵tree看起来生气了 阅读(167) 评论(0) 推荐(0)
Eureka-RestTemplate

摘要:RestTemplate是spring提供的简单便捷的模板类,用于在java代码里访问restful服务。 其功能与HttpClient类似,但是RestTemplate实现更加优雅,使用更加方便。 RestTemplate的使用步骤1.定义Bean 编写配置类RestTemplateConfig 阅读全文
posted @ 2020-10-21 16:51 那棵tree看起来生气了 阅读(166) 评论(0) 推荐(0)

博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3