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

Spring Boot Integration Apollo newspaper Cause: [status code: 404] how to solve Could not find config for namespace

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

Share

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

This article mainly explains the "Spring Boot integration Apollo newspaper Cause: [status code: 404] Could not find config for namespace how to solve", the article explains the content is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "Spring Boot integration Apollo newspaper Cause: [status code: 404] Could not find config for namespace how to solve" it!

Spring Boot integration Apollo reported the following exception:

10 Load config failed 11 will retry in 21.891 [main] SECONDS-Load config failed, will retry in 1. AppId: 201909261015778899, cluster: platform-tw, namespaces: application10:11:35.087 [main] WARN c.c.f.apollo.internals.DefaultConfig-Could not load config for namespace application from Apollo, please check whether the configs are released in Apollo! Return default value now 10 WARN c.c.f.a.i.AbstractConfigRepository 12 28. 291 [Apollo-RemoteConfigRepository-1] WARN c.c.f.a.i.AbstractConfigRepository-Sync config failed, will retry. Repository class com.ctrip.framework.apollo.internals.RemoteConfigRepository, reason: Load Apollo Config failed-appId: 201909261015778899, cluster: platform-tw, namespace: application Url: http://127.0.0.1:8001/configs/pf-core/platform-tw/application?ip=127.0.0.1&messages=%7B%22details%22%3A%7B%22pf-core%2Bplatform-tw%2Bapplication%22%3A5%2C%22pf-core%2Bdefault%2Bapplication%22%3A3%7D%7D [Cause: [status code: 404] Could not find config for namespace-appId: 201909261015778899, cluster: platform-tw, namespace: application, please check whether the configs are released in Apollo!]

It was a little strange at first that I didn't use the application namespace in the project, and the application.properties configuration was as follows:

# apply a globally unique identity app.id = 2019092677889 Apollo Meta Server address apollo.meta = http://127.0.0.1:8011# custom local profile cache path # apollo.cacheDir =. / configapollo.cluster = platform-tw# setting to load the Apollo configuration apollo.bootstrap.enabled = true# injection application namespaceapollo.bootstrap.namespaces = redis during the startup phase of the application

After looking at the source code, open the Apollo configuration annotation @ EnableApolloConfig (). The default namespace is application. If you need to inject the namespace to configure the redis attribute, there will naturally be an exception that cannot be loaded. The normal practice is to change the annotation to @ EnableApolloConfig (value = {"redis"}).

Thank you for reading, the above is the content of "Spring Boot integrated Apollo newspaper Cause: [status code: 404] Could not find config for namespace how to solve". After the study of this article, I believe you have a deeper understanding of how to solve this problem by Spring Boot integrated Apollo newspaper Cause: [status code: 404] Could not find config for namespace, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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