Как получить PropertySources с удаленного репозитория git на сервере конфигурации Spring Cloud? - PullRequest
1 голос
/ 30 мая 2020

У меня есть следующие классы

@EnableConfigServer
@SpringBootApplication
public class SpringCloudConfigServerApplication {

    public static void main(String[] args) {
        SpringApplication.run(SpringCloudConfigServerApplication.class, args);
    }

}

И application.properties

spring.application.name=spring-cloud-config-server
server.port=8888
spring.cloud.config.server.git.uri=https://github.com/user_name/microservices.git
spring.cloud.config.server.git.username==user_name
spring.cloud.config.server.git.password=password

limit-service.properties, поскольку этот файл находится на том же уровне, что и application.properties

limits-service.minimum=8
limits-service.maximum=888

когда я нажимаю URL-адрес http://localhost:8888/limits-service/default, я получаю ответ

{
name: "limits-service",
profiles: [
"default"
],
label: null,
version: "9675306e9b89f8f52bd26fe84eccf7c1fe8d34be",
state: null,
propertySources: [ ]
}

Каждый файл фиксируется в удаленном git репозитории, указанном в URL-адресе application.properties. Я не хочу использовать свой локальный git. Я хочу, чтобы свойства считывались с удаленного git. Я также хочу, чтобы свойства в limit-service отображались внутри propertySources выше. Где я ошибаюсь?

Project Heirarchy

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...