Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Apollo notes

Shulou Source: shulou.com Published: 2022-06-03 05:43:17 11月24日 Update

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

Tags: Configuration method query document application service information official basic configuration customer client data source file name permission identity format environment directory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info Redmi OPPO Reno MySQL Microsoft