Spring云配置服务器可以提供纯文本文件,如下所述:https://cloud.spring.io/spring-cloud-config/multi/multi__serving_plain_text.html
如果我将云服务器的URL卷曲为 curl http://config.server:8001/config-server/ConfigData/default/master/plainTxtFile.json(文件在私有github存储库中。)
因此,在使用配置服务器进行配置的spring boot应用程序中,我也可以通过通过代码访问上述url来获取文件。
有没有一种方法可以定义'configClient'并将文件访问为configClient.getResource(),而不是从url获取
答案 0 :(得分:0)