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

两学一做网站 新闻加强网站的建设工作

两学一做网站 新闻,加强网站的建设工作,如何建立网站站点,物联网平台有哪些转载自 SpringCloud配置中心高可用搭建 本文通过config server连接git仓库来实现配置中心#xff0c;除了git还可以使用svn或者系统本地目录都行。 引入依赖 dependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactId…转载自 SpringCloud配置中心高可用搭建 本文通过config server连接git仓库来实现配置中心除了git还可以使用svn或者系统本地目录都行。 引入依赖 dependenciesdependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-config-server/artifactId/dependencydependencygroupIdorg.springframework.cloud/groupIdartifactIdspring-cloud-starter-eureka/artifactId/dependency /dependencies spring-cloud-config-server这个就是配置中心server的依赖。 配置中心做到高可用本身也需要向注册中心注册自己的实例所以需求引用spring-cloud-starter-eureka依赖。 添加启动类开启Config Server功能 EnableDiscoveryClient EnableConfigServer SpringBootApplication public class ConfigApplication {public static void main(String[] args) {SpringApplication.run(ConfigApplication.class, args);}} EnableConfigServer即开启配置服务器的功能。 EnableDiscoveryClient开启自动注册客户端默认情况下ServiceRegistry实现将自动注册正在运行的服务。如注册中心使用是Eureka这里也可以使用的EnableEurekaClient注解。 添加Config配置 spring: application:name: config-centerprofiles:active: config-center1cloud: config:server:git:uri: ${git.uri}searchPaths: ${git.searchPaths}username: ${git.username}password: ${git.password}basedir: ${git.basedir}clone-on-start: trueforce-pull: trueeureka:instance: prefer-ip-address: true  instance-id: ${spring.cloud.client.ipAddress}:${server.port}lease-expiration-duration-in-seconds: ${lease-expiration-duration-in-seconds}lease-renewal-interval-in-seconds: ${lease-renewal-interval-in-seconds}client:serviceUrl:defaultZone: ${register-center.urls}--- spring:profiles: config-center1server: port: ${config-center1.server.port}--- spring: profiles: config-center2server: port: ${config-center2.server.port} 这里配置了两台Config Server都注册到了两台注册中心上。 Maven filter配置 #git git.urihttp://gitlab.example.com/test/config.git git.usernameroot git.passwordroot git.searchPathsconfig-center git.basedirf:/config/config-center/git Spring Cloud Git配置详解 spring.cloud.config.server.git.urigit仓库地址。 spring.cloud.config.server.git.searchPathsgit仓库搜索目录。 spring.cloud.config.server.git.username连接git的用户名。 spring.cloud.config.server.git.password连接git的用户名密码。 spring.cloud.config.server.git.basedir配置中心在本地缓存配置的目录。 spring.cloud.config.server.git.clone-on-start配置为true表示启动时就克隆配置缓存到本地。 spring.cloud.config.server.git.force-pull配置为true表示如果本地副本是脏的将使Spring Cloud Config Server强制从远程存储库拉取配置。 启动配置中心 分别启动以下配置中心使用不同的Profile指定端口。 spring-boot:run -Drun.profilesconfig-center1 -P dev spring-boot:run -Drun.profilesconfig-center2 -P dev
http://www.pierceye.com/news/548240/

相关文章:

  • 网络网站公司网站管理平台扩展插件
  • 个人小说网站怎么做把自己做的网页变成网站
  • led网站制作网站登录后不显示内容
  • 推广网站公司兴义市住房和城乡建设局网站
  • 营销网站建设的公司哪家好创建网站超链接
  • 苏州网站优化排名推广企业网站建设价格
  • 在线制作论坛网站wordpress建立好的网站
  • 网站的功能规范商城网站静态模板下载
  • 双语言网站源码制作网页的软件哪个好
  • 政务网站建设需求网站首页页面代码
  • 网站产品详情页怎么做的用服务器做网站空间
  • 河北网站制作报价长春市建设技工学校网站
  • 盘锦做网站专家常州网站建设企业网站制作
  • 关于建设网站的报告wordpress 视频 广告插件
  • 生态养殖网站模板网赌网站建设多少钱
  • wordpress is长沙百度提升优化
  • 福州网站建设哪个好网页被禁止浏览怎么解决
  • 缩短链接的网站磁力猫引擎
  • 佛山网站到首页排名网站开发招标任务书
  • 网站建设相关专业手机网站建设软件有哪些
  • 做网站编辑累吗平台推广策划
  • 景区网站模板深圳中建南方建设集团网站
  • 深圳市网站建设有补贴吗特殊教育学校网站建设方案
  • 专业电影网站建设建e全景效果图
  • 优惠券网站怎么做的哪里有网站制作
  • 单页网站搭建购买一级域名做网站
  • 优秀设计作品的网站单页网站仿制教程
  • 品牌形象网站有哪些ajs17网站建设
  • 微信公众号手机网站开发文成网站制作
  • 中邮通建设咨询有限公司官方网站网站升级及政务新媒体建设方案