首页 > 其他分享 >spring-cloud-starter-alibaba-nacos-discovery 配置信息

spring-cloud-starter-alibaba-nacos-discovery 配置信息

时间:2023-10-23 22:01:31浏览次数:38  
标签:name spring nacos alibaba type cloud discovery

spring-cloud-starter-alibaba-nacos-discovery

1. spring-config-metadata.json
{
  "groups": [
    {
      "name": "management.endpoint.nacosdiscovery",
      "type": "com.alibaba.cloud.nacos.endpoint.NacosDiscoveryEndpoint",
      "sourceType": "com.alibaba.cloud.nacos.endpoint.NacosDiscoveryEndpoint"
    },
    {
      "name": "spring.cloud.nacos.discovery",
      "type": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    }
  ],
  "properties": [
    {
      "name": "management.endpoint.nacosdiscovery.cache.time-to-live",
      "type": "java.time.Duration",
      "description": "Maximum time that a response can be cached.",
      "sourceType": "com.alibaba.cloud.nacos.endpoint.NacosDiscoveryEndpoint",
      "defaultValue": "0ms"
    },
    {
      "name": "management.endpoint.nacosdiscovery.enabled",
      "type": "java.lang.Boolean",
      "description": "Whether to enable the nacosdiscovery endpoint.",
      "sourceType": "com.alibaba.cloud.nacos.endpoint.NacosDiscoveryEndpoint",
      "defaultValue": true
    },
    {
      "name": "spring.cloud.nacos.discovery.access-key",
      "type": "java.lang.String",
      "description": "access key for namespace.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.cluster-name",
      "type": "java.lang.String",
      "description": "cluster name for nacos .",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "DEFAULT"
    },
    {
      "name": "spring.cloud.nacos.discovery.enabled",
      "type": "java.lang.Boolean",
      "description": "enable nacos discovery or not.",
      "defaultValue": true
    },
    {
      "name": "spring.cloud.nacos.discovery.endpoint",
      "type": "java.lang.String",
      "description": "the domain name of a service, through which the server address can be dynamically obtained.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.ephemeral",
      "type": "java.lang.Boolean",
      "description": "If instance is ephemeral.The default value is true.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": true
    },
    {
      "name": "spring.cloud.nacos.discovery.group",
      "type": "java.lang.String",
      "description": "group name for nacos.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "DEFAULT_GROUP"
    },
    {
      "name": "spring.cloud.nacos.discovery.heart-beat-interval",
      "type": "java.lang.Integer",
      "description": "Heart beat interval. Time unit: millisecond.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.heart-beat-timeout",
      "type": "java.lang.Integer",
      "description": "Heart beat timeout. Time unit: millisecond.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.instance-enabled",
      "type": "java.lang.Boolean",
      "description": "If instance is enabled to accept request. The default value is true.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": true
    },
    {
      "name": "spring.cloud.nacos.discovery.ip",
      "type": "java.lang.String",
      "description": "The ip address your want to register for your service instance, needn't to set it if the auto detect ip works well.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.ip-delete-timeout",
      "type": "java.lang.Integer",
      "description": "Ip delete timeout. Time unit: millisecond.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.log-name",
      "type": "java.lang.String",
      "description": "nacos naming log file name.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.metadata",
      "type": "java.util.Map<java.lang.String,java.lang.String>",
      "description": "extra metadata to register.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.nacos-properties",
      "type": "java.util.Properties",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.namespace",
      "type": "java.lang.String",
      "description": "namespace, separation registry of different environments.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.naming-load-cache-at-start",
      "type": "java.lang.String",
      "description": "naming load from local cache at application start. true is load.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "false"
    },
    {
      "name": "spring.cloud.nacos.discovery.namingLoadCacheAtStart",
      "type": "java.lang.Boolean",
      "description": "naming load from local cache at application start .",
      "defaultValue": "false"
    },
    {
      "name": "spring.cloud.nacos.discovery.network-interface",
      "type": "java.lang.String",
      "description": "which network interface's ip you want to register.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": ""
    },
    {
      "name": "spring.cloud.nacos.discovery.password",
      "type": "java.lang.String",
      "description": "nacos discovery service's password to authenticate.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "${spring.cloud.nacos.password}"
    },
    {
      "name": "spring.cloud.nacos.discovery.port",
      "type": "java.lang.Integer",
      "description": "The port your want to register for your service instance, needn't to set it if the auto detect port works well.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": -1
    },
    {
      "name": "spring.cloud.nacos.discovery.register-enabled",
      "type": "java.lang.Boolean",
      "description": "if you just want to subscribe, but don't want to register your service, set it to false.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": true
    },
    {
      "name": "spring.cloud.nacos.discovery.secret-key",
      "type": "java.lang.String",
      "description": "secret key for namespace.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties"
    },
    {
      "name": "spring.cloud.nacos.discovery.secure",
      "type": "java.lang.Boolean",
      "description": "whether your service is a https service.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": false
    },
    {
      "name": "spring.cloud.nacos.discovery.server-addr",
      "type": "java.lang.String",
      "description": "nacos discovery server address.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "${spring.cloud.nacos.server-addr}"
    },
    {
      "name": "spring.cloud.nacos.discovery.service",
      "type": "java.lang.String",
      "description": "the service name to register, default value is ${spring.application.name}.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "${spring.application.name}"
    },
    {
      "name": "spring.cloud.nacos.discovery.username",
      "type": "java.lang.String",
      "description": "nacos discovery service's username to authenticate.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": "${spring.cloud.nacos.username}"
    },
    {
      "name": "spring.cloud.nacos.discovery.watch-delay",
      "type": "java.lang.Long",
      "description": "watch delay,duration to pull new service from nacos server.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": 30000
    },
    {
      "name": "spring.cloud.nacos.discovery.watch.enabled",
      "type": "java.lang.Boolean",
      "description": "enable nacos discovery watch or not .",
      "defaultValue": "true"
    },
    {
      "name": "spring.cloud.nacos.discovery.weight",
      "type": "java.lang.Float",
      "description": "weight for service instance, the larger the value, the larger the weight.",
      "sourceType": "com.alibaba.cloud.nacos.NacosDiscoveryProperties",
      "defaultValue": 1
    },
    {
      "name": "spring.cloud.nacos.password",
      "type": "java.lang.String",
      "description": "nacos password to authenticate."
    },
    {
      "name": "spring.cloud.nacos.server-addr",
      "type": "java.lang.String",
      "description": "nacos server address.",
      "defaultValue": "localhost:8848"
    },
    {
      "name": "spring.cloud.nacos.username",
      "type": "java.lang.String",
      "description": "nacos userName to authenticate."
    }
  ],
  "hints": []
}
2. additional-spring-configuration-metadata.json
{"properties": [
    {
      "name": "spring.cloud.nacos.server-addr",
      "type": "java.lang.String",
      "defaultValue": "localhost:8848",
      "description": "nacos server address."
    },
    {
      "name": "spring.cloud.nacos.discovery.server-addr",
      "type": "java.lang.String",
      "defaultValue": "${spring.cloud.nacos.server-addr}",
      "description": "nacos discovery server address."
    },
    {
      "name": "spring.cloud.nacos.discovery.service",
      "type": "java.lang.String",
      "defaultValue": "${spring.application.name}",
      "description": "the service name to register, default value is ${spring.application.name}."
    },
    {
      "name": "spring.cloud.nacos.discovery.enabled",
      "type": "java.lang.Boolean",
      "defaultValue": true,
      "description": "enable nacos discovery or not."
    },
    {
      "name": "spring.cloud.nacos.discovery.instance-enabled",
      "type": "java.lang.Boolean",
      "defaultValue": true,
      "description": "If instance is enabled to accept request. The default value is true."
    },
    {
      "name": "spring.cloud.nacos.discovery.ephemeral",
      "type": "java.lang.Boolean",
      "defaultValue": true,
      "description": "If instance is ephemeral.The default value is true."
    },
    {
      "name": "spring.cloud.nacos.discovery.namingLoadCacheAtStart",
      "type": "java.lang.Boolean",
      "defaultValue": "false",
      "description": "naming load from local cache at application start ."
    },
    {
      "name": "spring.cloud.nacos.discovery.watch.enabled",
      "type": "java.lang.Boolean",
      "defaultValue": "true",
      "description": "enable nacos discovery watch or not ."
    },
    {
      "name": "spring.cloud.nacos.discovery.username",
      "type": "java.lang.String",
      "defaultValue": "${spring.cloud.nacos.username}",
      "description": "nacos discovery service's username to authenticate."
    },
    {
      "name": "spring.cloud.nacos.discovery.password",
      "type": "java.lang.String",
      "defaultValue": "${spring.cloud.nacos.password}",
      "description": "nacos discovery service's password to authenticate."
    },
    {
      "name": "spring.cloud.nacos.username",
      "type": "java.lang.String",
      "description": "nacos userName to authenticate."
    },
    {
      "name": "spring.cloud.nacos.password",
      "type": "java.lang.String",
      "description": "nacos password to authenticate."
    }
]}
3. 参考

标签:name,spring,nacos,alibaba,type,cloud,discovery
From: https://blog.51cto.com/u_4981212/7994617

相关文章

  • Spring MVC
    一、SpringMVC子父容器问题因为SpringMVC属于Spring的子框架,所以SpringMVC中可以使用Spring框架的全部内容。Spring官方为SpringMVC专门定义了一个容器,这个容器里面放SpringMVC中全部Bean,且这个容器属于Spring容器的子容器。有这样的一个规定:SpringMVC子容器可以调用Spr......
  • SpringBoot上传图片到指定目录并回显
    一、概述案例:1.利用SpringBoot写一个后台2.接收前端传递过来的图片并保存到服务器。3.前端可以通过url访问上传过的图片步骤:1.写一个FileController专门用来接收前端提交的图片文件,并把图片保存到服务器的指定位置2.配置W......
  • SpringBoot-自动配置原理
    导入start就会导入autoconfigure包autoconfigure包下面的META-INF/spring/org.springframe.boot.autoconfigure.AutoConfigation.imports文件存放了所有的xxxAutoConfigation自动配置类@EnableAutoConfigation注解,会把上面文件中的所有的自动配置类都导入进来,按需要加载。xxxA......
  • nacos启动脚本去除多余的javac
    github上面一个阿里巴巴开源的服务叫nacos,用途在这里不多说了,主要是在启动时他会寻找javac,但是很多服务器可能没有,所以我小小的修改了一下他的startup.sh然后给他打成了rpm包,也不知道网站可不可以直接把包传上来,这里是github的地址,乱放在一个仓库里面的:https://github.com/linux......
  • Spring Data JPA : 查-分页排序
    1.分页查询 pageNumber是从0开始,pageNumber=0,pageSize=3就是获取前3条参考创建分页Pageable变量创建Pageable对象,再查询importjava.util.List;importorg.springframework.beans.factory.annotation.Autowired;importorg.springframework.data.domain.Page;import......
  • spring data jpa 使用原生sql查询数据库 原生sql中有in关键字 该如何传参?直接传List集
    springdatajpa使用原生sql查询数据库原生sql中有in关键字该如何传参?直接传List集合就能找到数据,解析List集合交给springdatajpa框架去做遇到问题?第一次写的时候in关键字后面传的是将List集合转化为一个这样的字符串,"'123','23','23'" @Query(nativeQuery=true,......
  • Spring Data JPA : 查-条件化查询Specification
    条件化查询 用查询条件创建Specification对象参考SpringDataJPASpecification查询使用Criteria查询Criteria查询是面向对象查询,root就是一个对象,root.get("name")就是name属性。可以级联获取属性每一个查询条件创建一个Specification对象,如果有多个查询条件,就把多个Spec......
  • Springboot定时任务处理
    详细讲解SpringBoot利用注解创建静态定时任务,利用接口创建动态定时任务,利用@EnableAsync和@Async创建多线程定时任务阅读目录:序言一、静态:基于注解二、动态:基于接口三、多线程定时任务 阅读正文:回到顶部序言使用SpringBoot创建定时任务非常简单,目前主要有以下三......
  • Spring Cloud OpenFeign系列:简介和使用
    目录一、简介二、使用1、创建父工程2、创建order-service模块3、创建order-client模块三、效果四、配置说明1、超时配置全局超时配置局部超时配置2、Gzip压缩设置3、所有配置五、负载均衡五、对比Feign一、简介官网:https://spring.io/projects/spring-cloud-openfeign文档:https......
  • springboot整合swagger3.0
    pom文件中导入依赖 <dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-configuration-processor</artifactId></dependency>application.yml中写入配置swagger:enable:tr......