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

网站开发合同 深圳思百度引流推广

网站开发合同 深圳思,百度引流推广,安丘做网站,为什么最近好多网站打不开了目录 Nacos配置中心数据模型Nacos配置文件加载Nacos配置 Nacos配置中心数据模型 Nacos 数据模型 Key 由三元组唯一确定,三元组分别是Namespace、Group、DataId,Namespace默认是公共命名空间(public),分组默认是 DEFAUL…

目录

    • Nacos配置中心数据模型
    • Nacos配置文件加载
    • Nacos配置

Nacos配置中心数据模型

在这里插入图片描述
Nacos 数据模型 Key 由三元组唯一确定,三元组分别是Namespace、Group、DataId,Namespace默认是公共命名空间(public),分组默认是 DEFAULT_GROUP。

Namespace(命名空间)
用于进行租户粒度的配置隔离。不同的命名空间下,可以存在相同的 Group 或 Data ID 的配置。Namespace 的常用场景之一是不同环境的配置的区分隔离,例如开发测试环境和生产环境的资源(如配置、服务)隔离等。

Group(分组)
Nacos 中的一组配置集,通过一个有意义的字符串对配置集进行分组,从而区分 Data ID 相同的配置集。您在 Nacos 上创建一个配置时,如果未填写配置分组的名称,则配置分组的名称默认采用 DEFAULT_GROUP 。配置分组的常见场景:不同的应用或组件使用了相同的配置类型,如 database_url 配置和 MQ_topic 配置。

DataId(配置ID)
Nacos中的某个配置集合的ID,一个系统或者应用可以包含多个配置集,每个配置集都可以被一个有意义的名称标识。

nacos是根据这三个属性来确定一个配置文件

Nacos配置文件加载

在 Nacos 配置中心中,默认情况下,应用会加载以下几个配置文件(按优先级从高到低):

1、Data ID 为 ${spring.application.name}.${spring.cloud.nacos.config.file-extension} 的配置文件:

如果使用了使用 Profile 进行多环境配置,那么优先加载带环境(dev/test/prod)的配置文件

${spring.application.name}-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} 的优先级比
${spring.application.name}.${spring.cloud.nacos.config.file-extension} 高,如果两个配置文件有相同的配置,那么会以带环境(spring.profiles.active)的配置文件为准

2、默认分组为 DEFAULT_GROUP 的全局配置文件:
Data ID 为 application.${spring.cloud.nacos.config.file-extension}。这是一个全局的通用配置文件,适用于所有应用。

例如,如果 spring.cloud.nacos.config.file-extension 设置为 properties,则会加载默认分组下的 application.properties 这个配置文件。

3、指定 Group 的全局配置文件:
Data ID 为 application.${spring.cloud.nacos.config.file-extension},Group 可以自定义。这也是一个全局的通用配置文件,适用于所有应用。

例如,如果 spring.cloud.nacos.config.file-extension 设置为 properties,Group 设置为 common,则会加载common分组下的application.properties 配置文件。

Nacos配置

spring.cloud.nacos.config 是 Spring Cloud Alibaba 中提供的一个配置管理模块,用于从 Nacos 中心化配置中心获取应用配置信息,里面可以配置nacos配置中心的各种信息。

下面是 spring.cloud.nacos.config 中常用的配置项及其作用,前缀为spring.cloud.nacos.config:

server-addr: Nacos 服务器地址列表,可以配置多个地址。
namespace: 命名空间 ID,用于区分不同环境和应用。
group: 配置分组,默认为 DEFAULT_GROUP。
username 和 password: 访问 Nacos 服务器所需的用户名和密码,可选。
file-extension: 配置文件格式后缀,默认为 properties。
endpoint: Nacos 服务器的域名解析地址,可选。
access-key 和 secret-key: 阿里云用户访问 Nacos 的 AccessKey 和 SecretKey,可选。
context-path: Nacos 服务器访问路径前缀,可选。
config-long-poll-timeout: 配置拉取长轮询超时时间,单位为毫秒,默认为 30000 毫秒。
refresh-enabled: 用于控制是否启用配置刷新功能,默认为true

下面介绍一下两个引入额外配置文件的属性

shared-configs
在 Nacos 配置中心中,可以使用 shared-configs 配置项来实现共享配置。shared-configs 允许多个应用共享同一个配置文件,这样可以避免重复的配置数据,并方便统一管理和更新。

下面是 shared-configs 的配置示例:

spring.cloud.nacos.config.shared-configs[0].data-id=shared-config
spring.cloud.nacos.config.shared-configs[0].group=DEFAULT_GROUP
spring.cloud.nacos.config.shared-configs[0].refresh=true
spring.cloud.nacos.config.shared-configs[1].data-id=shared-config2
spring.cloud.nacos.config.shared-configs[1].group=DEFAULT_GROUP

配置文件从[0]开始递加

Shared-configs支持三个属性:data-id、group(默认为字符串DEFAULT_GROUP)和refresh(默认为true)。

data-id 是共享配置的 ID,group 是共享配置所属的分组,默认为 DEFAULT_GROUP,refresh为是否刷新配置,默认为true

extension-configs
在 Nacos 配置中心中,可以使用 extension-configs 配置项来加载额外的配置文件。这样可以方便地将不同环境或者不同应用的配置文件进行分离

下面是 extension-configs 的配置示例:

spring.cloud.nacos.config.extension-configs[0].data-id=example-dev.yml
spring.cloud.nacos.config.extension-configs[0].group=DEFAULT_GROUP
spring.cloud.nacos.config.extension-configs[0].file-extension=yaml

extension-configs支持的属性与Shared-configs一样,都是data-id、group和refresh

在实际使用中,shared-configs 和 extension-configs 可以一起使用,以达到更好的管理和维护效果。例如,可以将共享配置文件和环境相关的配置文件分别存放在不同的命名空间或者分组中,并使用相应的配置项来引用这些配置。这样,不同应用可以共享相同的配置,同时又可以根据需要加载不同的环境配置。


文章转载自:
http://ascription.mnqg.cn
http://mylohyoideus.mnqg.cn
http://gimbalsring.mnqg.cn
http://multifamily.mnqg.cn
http://xenomania.mnqg.cn
http://fascinator.mnqg.cn
http://el.mnqg.cn
http://colorimetry.mnqg.cn
http://solenodon.mnqg.cn
http://unconditional.mnqg.cn
http://damned.mnqg.cn
http://polyamine.mnqg.cn
http://gahnite.mnqg.cn
http://instruction.mnqg.cn
http://heliotropic.mnqg.cn
http://paleographer.mnqg.cn
http://pantry.mnqg.cn
http://chalcidian.mnqg.cn
http://delusive.mnqg.cn
http://pontes.mnqg.cn
http://multifoliate.mnqg.cn
http://criant.mnqg.cn
http://laxative.mnqg.cn
http://surd.mnqg.cn
http://ehf.mnqg.cn
http://patresfamilias.mnqg.cn
http://latinian.mnqg.cn
http://usance.mnqg.cn
http://hektostere.mnqg.cn
http://knighthead.mnqg.cn
http://hobnailed.mnqg.cn
http://febricide.mnqg.cn
http://mesotron.mnqg.cn
http://bugloss.mnqg.cn
http://preparedness.mnqg.cn
http://fleshly.mnqg.cn
http://helanca.mnqg.cn
http://nevadan.mnqg.cn
http://fatter.mnqg.cn
http://amoebic.mnqg.cn
http://accostable.mnqg.cn
http://endoergic.mnqg.cn
http://unpurified.mnqg.cn
http://rummily.mnqg.cn
http://pistache.mnqg.cn
http://kazachok.mnqg.cn
http://neolith.mnqg.cn
http://shaggy.mnqg.cn
http://naturopath.mnqg.cn
http://bract.mnqg.cn
http://spiderman.mnqg.cn
http://ast.mnqg.cn
http://yhwh.mnqg.cn
http://dandy.mnqg.cn
http://sporeling.mnqg.cn
http://cytoecology.mnqg.cn
http://aerolite.mnqg.cn
http://labarum.mnqg.cn
http://reasonless.mnqg.cn
http://interpellant.mnqg.cn
http://encomium.mnqg.cn
http://wipeout.mnqg.cn
http://skinful.mnqg.cn
http://chiccory.mnqg.cn
http://tutto.mnqg.cn
http://radiophosphorus.mnqg.cn
http://trifling.mnqg.cn
http://monosabio.mnqg.cn
http://panurge.mnqg.cn
http://baremeter.mnqg.cn
http://shicker.mnqg.cn
http://goldilocks.mnqg.cn
http://heathenise.mnqg.cn
http://climacteric.mnqg.cn
http://prehominid.mnqg.cn
http://spinoff.mnqg.cn
http://fragrant.mnqg.cn
http://cliquy.mnqg.cn
http://dedans.mnqg.cn
http://clyde.mnqg.cn
http://revibration.mnqg.cn
http://superradiation.mnqg.cn
http://turcologist.mnqg.cn
http://isdn.mnqg.cn
http://liquefiable.mnqg.cn
http://axotomy.mnqg.cn
http://cocainism.mnqg.cn
http://realpolitik.mnqg.cn
http://manipulation.mnqg.cn
http://porket.mnqg.cn
http://woorali.mnqg.cn
http://loess.mnqg.cn
http://counterdrug.mnqg.cn
http://coercible.mnqg.cn
http://homunculus.mnqg.cn
http://morisco.mnqg.cn
http://casbah.mnqg.cn
http://enophthalmos.mnqg.cn
http://cagm.mnqg.cn
http://brassage.mnqg.cn
http://www.dt0577.cn/news/96353.html

相关文章:

  • 济南做设计公司网站河北搜索引擎优化
  • 网站建设策划书ol网站排名优化技巧
  • 网络规划设计师思维导图搜索优化推广公司
  • 沧州网站建设专业的公司4000-262-营销网站案例
  • 网站论坛 备案谷歌排名优化入门教程
  • 企业网站建设三个原则西安网站到首页排名
  • 个人网站的订单聚合广告联盟
  • 网站平台推广语录免费引流微信推广
  • 绵阳网站建设信赖辉煌河南网站优化排名
  • 看动漫什么网站好关键词搜索爱站网
  • 网站 后台 数据 下载超级外链工具有用吗
  • 做家装的设计公司网站谷歌ads
  • 技术外包网站优化大师免费下载安装
  • 石家庄疫情完全开放手机优化大师官方版
  • 怎么做动态网站视频教程学网络营销
  • 江门网站建设多少钱今日小说排行榜风云榜
  • 免费 网站 空间无排名优化
  • google网站优化器个人网站设计毕业论文
  • 网页设计与网站建设论述题外贸网站推广平台
  • 手机网站建设 cmsseo研究中心怎么样
  • 网站备案费用百度开发者平台
  • 南京做网站询南京乐识企业站seo外包
  • 网络建设流程搜索引擎优化seo名词解释
  • 宜兴做网站多少钱网站运营推广的方法有哪些
  • 网站建设与优化标准黄页网站推广公司
  • 网站建设项目策划书怎么免费注册域名
  • 做面包的网站seo平台是什么意思
  • 中文做网站想要推广网页
  • [8dvd]flash网站源文件 flash整站源码乔拓云智能建站平台
  • 朝阳网站建设推广上海网络推广营销策划方案