You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
spring-cloud-alibaba/spring-cloud-alibaba-examples/acm-example/acm-local-example/readme-zh.md

47 lines
2.0 KiB
Markdown

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# ACM Local Example
## 项目说明
本项目展示了在Spring Cloud规范下如何以最简单且免费的方式使用ACM产品将配置统一管理。
应用配置管理Application Configuration Management简称 ACM其前身为淘宝内部配置中心 Diamond是一款应用配置中心产品。基于该应用配置中心产品您可以在微服务、DevOps、大数据等场景下极大地减轻配置管理的工作量的同时保证配置的安全合规。更多 ACM 相关的信息,请参考 [ACM官网](https://www.aliyun.com/product/acm)。
## 示例
### 准备工作
ACM支持直接使用免费的轻量版配置中心进行开发和调试工作。本示例也是基于轻量版配置中心的因此我们需要首先安装和启动轻量版配置中心。
1. [下载轻量版配置中心](https://edas-public.oss-cn-hangzhou.aliyuncs.com/install_package/LCC/2018-11-01/edas-lite-configcenter.tar.gz?file=edas-lite-configcenter.tar.gz)
2. 解压 edas-lite-configcenter.tar.gz ,然后执行以下命令。
cd edas-config-center && sh startup.sh
出现以下内容说明轻量版配置中心启动成功。
Edas-config-center has been started successfully.
You can see more details in logs/config-center.log.
3. 进入页面 http://127.0.0.1:8080在左侧"配置列表"页面中,点击"添加"按钮,添加如下配置。
GroupDEFAULT_GROUP
DataIdacm-local.properties
Contentuser.id=xiaolongzuo
### 启动应用
直接运行main class即`AcmApplication`。
### 查看效果
1. 使用`curl`可以看到在配置中心配置的user.id。
curl http://127.0.0.1:18089/
2. 进入页面 http://127.0.0.1:8080在左侧"配置列表"页面中更改user.id的值以后再次使用`curl`命令,可以看到配置变化。
如果您对 Spring Cloud ACM Starter 有任何建议或想法,欢迎提交 issue 中或者通过其他社区渠道向我们反馈。