Skip to content

git commit -m "第一版,默认zookeeper启动在127.0.0.1:2187上,提供/api/kv/的一个put、一个get接口#6

Open
huang-juanjuan wants to merge 2 commits into
wholvecoding:masterfrom
huang-juanjuan:feature/client-sdk
Open

git commit -m "第一版,默认zookeeper启动在127.0.0.1:2187上,提供/api/kv/的一个put、一个get接口#6
huang-juanjuan wants to merge 2 commits into
wholvecoding:masterfrom
huang-juanjuan:feature/client-sdk

Conversation

@huang-juanjuan
Copy link
Copy Markdown
Collaborator

测试在本地,假定zookeeper启动在127.0.0.1:2181, dkv-server为自用测试类
启动\distributedKeyValue\dkv-client\src\main\java\com\dkv\dkvclient\DkvClientApplication.java
client运行在8081(application.properties修改)
启动后在127.0.0.1:8081提供两个接口
post:
curl -X POST http://localhost:8081/api/kv/name -H "Content-Type: application/json" -d '{"value":"huangtianyu"}'
设name对应的value为指定值
get:
curl http://localhost:8081/api/kv/name
获取name对应的值

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant