线偶

线偶的IT笔记

20 Client 获取配置

nacos 基于 2.2.4 版本 这里的 client 是指 nacos SDK,也就是模块 nacos-client. 获取配置 源码位置: com.alibaba.nacos.client.config.NacosConfigService#getConfig 1 2 3 4 5 // 获取配置 @Override public String getConfig(String dataId, String group, long timeoutMs) throws NacosException { return getConfigInner(namespace, dataId, group, timeoutMs); } 源码位置: com.alibaba.nacos.client.config.NacosConfigService#getConfigInner 1 2 3

简单封装 Thrift 协议

build.gradle 文件 1 2 3 4 5 6 7 8 9 10 11 plugins { id("com.linecorp.thrift-gradle-plugin") version "0.5.0" } dependencies { api('org.apache.thrift:libthrift:0.19.0') api('org.springframework.boot:spring-boot-starter-logging') api('cn.hutool:hutool-all') testImplementation('org.springframework.boot:spring-boot-starter-test') } example.thrift 文件 文件放在路径: src/main/thrift, 运行 gradle 命令 compileThrift 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
0%