如何使用Spring Cloud从GitHub文件夹中读取多个属性文件?
我有一台弹簧服务器,可以访问特定的GitHub存储库。该存储库包含一个文件夹,并具有多个属性文件,并且它们都有不同的名称,因此我无法使用其相应的应用程序和配置文件来获得它们。有什么办法可以在不需要他们的名字的情况下检索所有这些? 例如,我的Spring Cloud Server当前从我的GitHub存储库中访问application.properties文件。如果存在另一个文件夹,并且在该文件夹中存在多个.properties文件,我该如何检索它们?
spring:
cloud:
config:
server:
git:
uri : https://github.com/xxxxxx/cloud-config-server.git
management:
endpoints:
web:
exposure:
include: "*"
文件夹 ││├前示例1. properties │└└前示例2. Properties │├├前示例3. Properties 示例。
│││前
I have a Spring server that accesses a specific GitHub repo. The repo contains a folder and has multiple property files and all of them have different names, so I can't get them using their corresponding application and profile. Is there any way I can retrieve all of them without needing their name?
For example my spring cloud server currently accesses the application.properties file from my github repo. If there exists another folder and within that folder there exist multiple .properties files how do i retrieve them?
spring:
cloud:
config:
server:
git:
uri : https://github.com/xxxxxx/cloud-config-server.git
management:
endpoints:
web:
exposure:
include: "*"
FOLDER
│ ├── example1.properties
│ └── example2.properties
│ ├── example3.properties
│ └── example4.properties
Can I access all of these property files from this folder in one shot, without any specific need for their names?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论