apolloconfig / apollo

Apollo is a reliable configuration management system suitable for microservice configuration management scenarios.
https://www.apolloconfig.com
Apache License 2.0
28.94k stars 10.19k forks source link

关于使用yaml配置的问题 #5098

Closed ZxyNull0 closed 4 months ago

ZxyNull0 commented 4 months ago

为什么yaml格式或者json格式 namespace无法获取到,

如下,我新建了3个集群,application、test_1和yaml123,

其中application和test_1是key :value格式;yaml123是yaml格式。

再下发配置的时候,yaml格式的确无法获取。

appolication:正常

test-1:正常

获取yaml:不正常

dosubot[bot] commented 4 months ago

🤖

Based on the information you've provided, it seems like the issue might be related to the existence or accessibility of the "yaml123" cluster under the specified application ID. The Apollo configuration management system throws a NotFoundException when it can't find a cluster with the specified appId and clusterName. This exception results in a 404 Not Found status code being returned to your GET request in Postman. You can find more details about this in the NotFoundException.java file.

As for your question about YAML formatted clusters, yes, Apollo does support YAML formatted configurations. This is evident from the application.yml file in the repository, which is a YAML file used for configuration purposes. You can check this file here.

To resolve your issue, I would suggest double-checking the application ID and the cluster name you're using in your GET request. Make sure that the "yaml123" cluster exists and is accessible under the specified application ID. If the issue persists, it might be helpful to look into the server logs for any error messages or exceptions that could provide more insight into the problem.

Sources

#### About Dosu This response is meant to be useful and save you time. It is **not meant to be a precise solution**, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot.
ZxyNull0 commented 4 months ago

加上后缀名即可。