Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Apollo notes

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/03 Report--

Official document: https://github.com/ctripcorp/apollo/wiki/Apollo%E9%85%8D%E7%BD%AE%E4%B8%AD%E5%BF%83%E4%BB%8B%E7%BB%8D

I. basic configuration

1. Application AppId: a unique id used to identify the identity of the application, in the format of string, which corresponds to the app.id configured in the client / META-INF/app.properties

two。 Specify environment information at startup, DEV FAT PRO, sample java-Denv=DEV-jar xxx.jar

3. Make sure the application has permissions for this directory, / opt/data. Cache information is stored in / opt/data/ {appId} / config-cache, and the file name is {appId} + {cluster} + {namespace} .properties.

4. Startup initialization: apollo.bootstrap.enabled=true

II. Troubleshooting

1. Polling change: http://127.0.0.1:9100/notifications/v2?cluster=default&appId=wandaph-risk&ip=127.0.0.1 ifications= [{"namespaceName": "application", "notificationId":-1}]

two。 Query configuration: http://127.0.0.1:9100/configs/wdhrisk/default/application?ip=127.0.0.1

3. Query meta service http://127.0.0.1:9100/services/meta

Query admin service http://127.0.0.1:9100/services/config?ip=127.0.0.1&appId=wandaph-risk

Query config service http://127.0.0.1:9100/services/admin

III. Mode of use

1.API mode

2.Spring integration mode

2.1 XML mode

2.2 java-based configuration

2.3 injection configuration during the bootstrap phase of spring boot accident

For details, please see the official document: https://github.com/ctripcorp/apollo/wiki/Java%E5%AE%A2%E6%88%B7%E7%AB%AF%E4%BD%BF%E7%94%A8%E6%8C%87%E5%8D%97#%E4%B8%89%E5%AE%A2%E6%88%B7%E7%AB%AF%E7%94%A8%E6%B3%95

IV. Data source configuration

Implementation class: PoolProperties

Documentation: http://www.cnblogs.com/yueshutong/p/9409295.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report