【文件属性】:
文件名称:CMPE273Project:273计划
文件大小:92.2MB
文件格式:ZIP
更新时间:2021-07-07 14:10:56
Java
CMPE273项目
使用示例应用程序测试项目执行
保持 etcd 在本地运行
下载 spring-boot-sample-application
确保 lib 文件夹和构建路径中有 etcddition.jar 和 etcdditionlibrary.jar
构建应用程序
从终端执行命令运行应用程序,java -jar -Dserver.port=8081 build/libs/spring-boot-sample-simple-0.0.0.jar
etcd 的密钥格式
etcd 中的值格式 {"Appname": "xxxxxxxxxxxxx", "hostname": "xxxxxxxxxxxx", "port":"xxxxxxxxxxxxxxx"}
领导者存储在
例如。 对于数据库服务replica1,key是applications/sampleapplication/