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

做网站的费用计入什么科目网页版微信二维码怎么扫

做网站的费用计入什么科目,网页版微信二维码怎么扫,2个域名指向同一个网站,googleapis wordpress前言 在实际开发中经常会有一个叫做配置中心的服务#xff0c;这个服务经过变更参数来动态刷新线上业务数据行为配置。比如#xff1b;行为开关、活动数据、黑白名单、本地/预发/线上环境切换等等#xff0c;这些配置信息往往需要在我们不重启系统的时候就可以被更新执行。那…前言 在实际开发中经常会有一个叫做配置中心的服务这个服务经过变更参数来动态刷新线上业务数据行为配置。比如行为开关、活动数据、黑白名单、本地/预发/线上环境切换等等这些配置信息往往需要在我们不重启系统的时候就可以被更新执行。那么我们一般会使用具备此类属性在分布式系统中适合的组件进行开发配置中心像是zookeeper、redis发布订阅、或者http定时轮许拉取他们都可以做成统一配置中心服务。而在Spring Cloud Config 中默认采用 Git 来存储配置信息所以使用 Spring Cloud Config 构建的配置服务器天然就支持对微服务应用配置信息的版本管理在加上Github的Webhook钩子服务可以在我们push等行为操作的时候自动执行我们的http行为以达到自动刷新配置服务。 案例说明 通过在个人Git创建配置服务工程开启Webhooks服务添加回调钩子http://xxx:port/actuator/refresh在更新配置后自动刷新服务配置内容. web/ConfigClientController.java 添加注解RefreshScope自动刷新配置 RestController RefreshScope public class ConfigClientController {Value(${info.profile:error})private String profile;GetMapping(/config)public MonoString config() {return Mono.justOrEmpty(profile);}}ConfigClientApplication.java 普通配置即可 SpringBootApplication public class ConfigClientApplication {public static void main(String[] args) {SpringApplication.run(ConfigClientApplication.class, args);}} application.yml 需要配置endpoints这样才可以暴漏刷新服务 spring:application:name: demo-springcloud-config-client server:port: 9001# /actuator/refresh 这个 Endpoint 暴露出来 management:endpoints:web:exposure:include: refresh bootstrap.yml 配置中心服务配置http://localhost:7397 spring:cloud:config:uri: http://localhost:7397 # 配置中心的具体地址demo-springcloud-config-servername: config-client # 对应 {application} 部分例如config-client-dev 只取最后一个符号-之前的profile: dev # 对应 {profile} 部分label: master # 对应 {label} 部分即 Git 的分支。如果配置中心使用的是本地存储则该参数无用#配置文件会被转换成 Web访问规则如下 #/{application}/{profile}[/{label}] #/{application}-{profile}.yml #/{label}/{application}-{profile}.yml #/{application}-{profile}.properties #/{label}/{application}-{profile}.properties ConfigServerApplication.java 添加注解EnableConfigServer设置成配置服务中心 SpringBootApplication EnableConfigServer public class ConfigServerApplication {public static void main(String[] args) {SpringApplication.run(ConfigServerApplication.class, args);}}application.yml server:port: 7397spring:application:name: demo-springcloud-configcloud:config:server:git:uri: https://github.com/xxx/-demo-config # 换成自己的配置Git仓库的地址如果没有可以新建工程地址也可以克隆我的search-paths: config-repo # Git仓库地址下的底层配置文件名称如果配置多个用逗号,分割。# 如果配置中心需要访问权限则开启配置 # spring.cloud.config.server.git.usernameGithub账户 # spring.cloud.config.server.git.passwordGithub密码 测试验证 1:准备好自己Github的配置仓库也可以克隆我的Githttps://github.com/fuzhengwei/itstack-demo-config 有一组配置配置文件 2:配置Webhooks在https://github.com/换你自己的fuzhengwei/换你自己的itstack-demo-netty/settings/hooks/new 3:分别启动服务 demo-springcloud-config-server 配置Server demo-springcloud-config-client 配置Client 访问配置服务端口7397http://localhost:7397/config-client/dev 访问结果 {name: config-client,profiles: [dev],label: null,version: ea0b1a1017595d542aa01b8b2bda68f9620dd81a,state: null,propertySources: [{name: https://github.com/fuzhengwei/itstack-demo-config/config-repo/config-client-dev.yml,source: {info.profile: dev bus}}] } 访问规则配置文件会被转换成 Web 接口规则如下 /{application}/{profile}[/{label}] /{application}-{profile}.yml /{label}/{application}-{profile}.yml /{application}-{profile}.properties /{label}/{application}-{profile}.properties 访问配置文件http://localhost:8080/config-client-dev.yml 可以直接访问查看配置信息 info:profile: dev bus 访问使用配置的客户端端口9001http://localhost:9001/config 可以提交配置代码反复刷新测试 dev bus 综上总结 1:Spring Cloud Config 可以很方便的依赖于Github提供的回调钩子进行更新配置同时也支持本地配置 2:Webhooks 不止可以用于变更配置还可以用于一起启动触发工程打包部署发布的行为 3:不要局限于知识点往往每一个新知识所带来的架构设计更值得学习这些都可以灵活的用于项目系统中 好了到这里就结束了springcloud之基于github webhook动态刷新服务配置的学习大家一定要跟着动手操作起来。需要源码的 可si我获取
http://www.w-s-a.com/news/344279/

相关文章:

  • 北京教育云平台网站建设中国服装设计网站
  • 网络公司专业做网站豌豆荚app下载
  • 网站建设属于什么岗位济宁网站建设_云科网络
  • wordpress网站监测fwa 网站 欣赏
  • 用jsp做的可运行的网站推广网络
  • 电商网站设计论文wordpress子文件夹建站
  • 临沂网站优化如何如何做公司的网站建设
  • 建设部网站 光纤到户沈阳网页设计兼职
  • 企业网站建设作用宁波企业网站推广效果好
  • wordpress课件站模板做网站的公司 贵阳
  • 低价格网站建设网站建设中的板块名称
  • 青岛网站建设华夏h5链接是什么意思
  • 贸易公司如何做网站百度做的网站一般在什么后台
  • 东莞网站设计方案广州做服装电商拿货的网站
  • 部队网站建设设计dede个人网站模板
  • 个人网站怎么自己备案重庆怎样网站推广
  • 做电影网站挣钱吗重庆网站建设技术托管
  • 网站建设用户登录网站商业授权含义
  • 接做室内效果图的网站wordpress制作上传图片
  • 维护一个网站一年多少钱网站微信登录怎么做的
  • 中国建设银行网站E路护航官网如何在招聘网站上选个好公司做销售
  • 网站开发质量管理招聘网站建设方案
  • 有没有那个的网站seo编辑的工作内容
  • 平度那里有做网站的昆明建设招聘信息网站
  • 邯郸城乡建设部网站首页唐山市住房城乡建设部网站主页
  • 慕课联盟网站开发实战六安品牌网站建设电话
  • 制作企业网站首页贵州小程序制作开发
  • 什么是网站后台郑州众志seo
  • 做线上交互的网站分销平台
  • 培训机构网站开发江门cms模板建站