当前位置: 首页 > news >正文

域名app广东seo点击排名软件哪里好

域名app,广东seo点击排名软件哪里好,广州市红十字会医院网站建设项目,网站怎么做防御接上一篇文章,这里记录一下Config Server从github 远程读取配置文件。 Spring cloud Config支持从远程Git仓库读取配置文件,即 Config Server可以不从本地的仓库读取,而是从远程Git仓库读取。这样做的好处就是将配置统一管理,并且可以通过 Spring Cloud Bus在不人工…

接上一篇文章,这里记录一下Config Server从github 远程读取配置文件。

Spring cloud Config支持从远程Git仓库读取配置文件,即 Config Server可以不从本地的仓库读取,而是从远程Git仓库读取。这样做的好处就是将配置统一管理,并且可以通过 Spring Cloud Bus在不人工启动程序的情况下对 Config Client的配置进行刷新。这里采用GitHub作为远程Git仓库.

Config Server从github 远程读取配置文件

修改Config Server 的配置文件application.properties  添加git 相关配置。
server.port=8797
spring.application.name=config-server#从本地读取配置文件####################################################
#spring.profiles.active=native
#spring.cloud.config.server.native.search-locations=classpath:/shared
######################################################################从读取远程github配置文件####################################################
spring.cloud.config.server.git.uri=https://github.com/xuweichao/SpringCloud-Demo
spring.cloud.config.server.git.search-paths=SpringcloudConfig
spring.cloud.config.server.git.username=******
spring.cloud.config.server.git.password=******
spring.cloud.config.label=master

其中 spring.cloud.config.server.git.uri 为GitHub 项目名

spring.cloud.config.server.git.search-paths 为存放配置文件的目录

spring.cloud.config.server.git.username 为github 账号
spring.cloud.config.server.git.password 密码
spring.cloud.config.label=master 分支名

需要先将 config-client-dev.properties 上传至github .

重启config-server 和config-client ,请求http://localhost:8798/main 返回 “config-client-v1”.说明从github 远程获取配置文件成功!

构建高可用的Config Server

当服务实例很多时,可以考虑将Config Server 做成一个微服务。并将其集群化,达到高可用。所以需要将config-server 和config-client 向eureka-server 注册。

接下来对config-server 和config-client 进行改造。

两个module 都加入eureka依赖

 <!--构建高可用的Config Server 将config server 作为eureka client--><dependency><groupId>org.springframework.cloud</groupId><artifactId>spring-cloud-starter-netflix-eureka-client</artifactId></dependency>

并在启动类添加注解@EnableEurekaClient 开启 eureka服务。

添加eureka-server 配置

eureka.client.service-url.defaultZone=http://localhost:8791/eureka/

config-client 在增加一下配置:

spring.cloud.config.label=master
spring.cloud.config.profile=devspring.cloud.config.discovery.service-id=config-server
spring.cloud.config.discovery.enabled=true
spring.cloud.config.fail-fast=true

依次启动eureka-server,config-server,config-client .

浏览器访问eureka-server http://localhost:8791/
在这里插入图片描述
config-server,config-client 注册成功。

请求http://localhost:8798/main 返回 “config-client-v1”.说明从github 远程获取配置文件成功!


版权声明:本文为CSDN博主「天青色等烟雨11」的原创文章,遵循CC 4.0 by-sa版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_27828675/article/details/83504743

http://www.lbrq.cn/news/2804797.html

相关文章:

  • 山西建站推广企业网站推广公司
  • 网站建设ppt介绍关键词优化网站排名
  • 做app好还是响应式网站广告推广渠道有哪些
  • 门户网站建设工作室百度竞价推广联系方式
  • 做网站用哪个编程语言河南网站推广多少钱
  • 武汉做网站 九州科技bt兔子磁力搜索
  • 网站界面尺寸大小门户网站怎么做
  • 如何加强省市网站建设100个经典创意营销方案
  • 网站制作公司交接网站服务器信息查询
  • 城市分站cms怎么做网络推广
  • 网站建设 百度推广网站优化公司哪家效果好
  • 制作网站服务公司app开发需要哪些技术
  • ppt做长图网站网络营销推广公司简介
  • 做网站图片素材在线编辑网店推广网站
  • 怎么让百度收录我的网站优化关键词软件
  • ecshop外贸网站黄页网络的推广网站有哪些
  • 门户网站建设内在百度上打广告找谁推广产品
  • 温州市网站制作哪家便宜nba西部最新排名
  • 网站运维工作内容cctv 13新闻频道
  • 网站推广途径和要点有哪些沈阳关键词自然排名
  • bootstrap 新闻网站模板网店推广实训报告
  • 多用户网站建设查网站排名
  • 5星做号宿水软件的网站广丰网站seo
  • 阳泉做网站多少钱百度天眼查
  • 网站报错500竞价什么意思
  • 巩义云启网站建设深圳网站制作公司
  • 服装租赁 网站 php杭州旺道企业服务有限公司
  • 西安个人建网站百度站长平台链接提交
  • 自己做网站的好处河池网站seo
  • 做网站建设优化的公司百度有钱花人工客服
  • 视觉语言大模型应用开发——基于 CLIP、Gemini 与 Qwen2.5-VL 的视频理解内容审核全流程实现
  • 当我们想用GPU(nlp模型篇)
  • 如何从根源上理解并解决前端的CORS跨域问题
  • 深入理解 Spring Boot Starter:简化依赖管理与自动配置的利器
  • 【Canvas与旗帜】美国星条旗玻璃光圆饼
  • 【问题思考】为什么需要文件后缀?(gemini完成)