Spring boot spring.profiles.include是否不使用spring云配置服务器?

Spring boot spring.profiles.include是否不使用spring云配置服务器?,spring-boot,spring-cloud-config,Spring Boot,Spring Cloud Config,我正在使用SpringCloudConfigServer从Github检索配置文件 我有bootstrap.properties文件,该文件具有: spring.profiles.active=dev spring.profiles.include=a,b 在配置服务器即(github)中,我有以下文件名: service-name-dev.properties service-name-a.properties service-name-b.properties 我可以看到它能够检索ser

我正在使用SpringCloudConfigServer从Github检索配置文件

我有bootstrap.properties文件,该文件具有:

spring.profiles.active=dev
spring.profiles.include=a,b
在配置服务器即(github)中,我有以下文件名:

service-name-dev.properties
service-name-a.properties
service-name-b.properties
我可以看到它能够检索service-name-dev.properties,但由于某些原因无法获取其他两个

编辑:日志

    2020-10-07 12:53:51,782 [main            ] ERROR [ / ]  o.s.boot.SpringApplication - Application run failed
java.lang.IllegalStateException: Could not locate PropertySource and the fail fast property is set, failing
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:148) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:52) ~[spring-cloud-context-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locateCollection(ConfigServicePropertySourceLocator.java:163) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator$$FastClassBySpringCGLIB$$fa44b2a.invoke(<generated>) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218) ~[spring-core-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:91) ~[spring-retry-1.2.5.RELEASE.jar!/:na]
    at org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287) ~[spring-retry-1.2.5.RELEASE.jar!/:na]
    at org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:164) ~[spring-retry-1.2.5.RELEASE.jar!/:na]
    at org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:118) ~[spring-retry-1.2.5.RELEASE.jar!/:na]
    at org.springframework.retry.annotation.AnnotationAwareRetryOperationsInterceptor.invoke(AnnotationAwareRetryOperationsInterceptor.java:153) ~[spring-retry-1.2.5.RELEASE.jar!/:na]
    at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691) ~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator$$EnhancerBySpringCGLIB$$1f84d380.locateCollection(<generated>) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:98) ~[spring-cloud-context-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:626) ~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
    at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:370) ~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:314) ~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
    at com.esure.api.paymentplanoptions.PaymentPlanOptionsApplication.main(PaymentPlanOptionsApplication.java:23) [classes!/:1.1.3-SNAPSHOT]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
    at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [app.jar:1.1.3-SNAPSHOT]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:109) [app.jar:1.1.3-SNAPSHOT]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [app.jar:1.1.3-SNAPSHOT]
    at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [app.jar:1.1.3-SNAPSHOT]
Caused by: org.springframework.web.client.HttpServerErrorException$InternalServerError: 500 Internal Server Error: [{"timestamp":"2020-10-07T12:53:51.771+0000","status":500,"error":"Internal Server Error","message":"Could not construct context for config=service-name profile=a,b,dev label= includeOrigin=true; nested exception is java.lang.NullPointerException","path":"/path-to-config/service-name/a,b,dev"}]
    at org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:186) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:782) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:740) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:674) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.web.client.RestTemplate.exchange(RestTemplate.java:583) ~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.getRemoteEnvironment(ConfigServicePropertySourceLocator.java:264) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    at org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:107) ~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
    ... 29 common frames omitted
2020-10-07 12:53:51782[main]错误[/]o.s.boot.SpringApplication-应用程序运行失败
java.lang.IllegalStateException:找不到PropertySource,设置了fail fast属性,失败
在org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locate(ConfigServicePropertySourceLocator.java:148)~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.cloud.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:52)~[spring-cloud-context-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.cloud.config.client.ConfigServicePropertySourceLocator.locateCollection(ConfigServicePropertySourceLocator.java:163)~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.cloud.config.client.ConfigServicePropertySourceLocator$$FastClassBySpringCGLIB$$fa44b2a.invoke()~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)~[spring-core-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:163)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.procedue(CglibAopProxy.java:749)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.retry.interceptor.RetryOperationsInterceptor$1.doWithRetry(RetryOperationsInterceptor.java:91)~[spring-retry-1.2.5.RELEASE.jar!/:na]
在org.springframework.retry.support.RetryTemplate.doExecute(RetryTemplate.java:287)~[spring-retry-1.2.5.RELEASE.jar!/:na]
在org.springframework.retry.support.RetryTemplate.execute(RetryTemplate.java:164)~[spring-retry-1.2.5.RELEASE.jar!/:na]
在org.springframework.retry.interceptor.RetryOperationsInterceptor.invoke(RetryOperationsInterceptor.java:118)~[spring-retry-1.2.5.RELEASE.jar!/:na]
在org.springframework.retry.annotation.annotationawaretryoperationsinterceptor.invoke(annotationawaretryoperationsinterceptor.java:153)~[spring-retry-1.2.5.RELEASE.jar!/:na]
在org.springframework.aop.framework.ReflectiveMethodInvocation.procedue(ReflectiveMethodInvocation.java:186)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.procedue(CglibAopProxy.java:749)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:691)~[spring-aop-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.cloud.config.client.ConfigServicePropertySourceLocator$$EnhancerBySpringCGLIB$$1f84d380.locateCollection()~[spring-cloud-config-client-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.cloud.bootstrap.config.PropertySourceBootstrapConfiguration.initialize(PropertySourceBootstrapConfiguration.java:98)~[spring-cloud-context-2.2.3.RELEASE.jar!/:2.2.3.RELEASE]
在org.springframework.boot.SpringApplication.applyInitializers(SpringApplication.java:626)~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
在org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:370)~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:314)~[spring-boot-2.3.2.RELEASE.jar!/:2.3.2.RELEASE]
在com.esure.api.paymentplanoptions.PaymentPlanOptionsApplication.main(PaymentPlanOptionsApplication.java:23)[classes!/:1.1.3-SNAPSHOT]
在sun.reflect.NativeMethodAccessorImpl.invoke0(本机方法)~[na:1.8.0_212]
在sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:1.8.0212]
在sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:1.8.0212]
在java.lang.reflect.Method.invoke(Method.java:498)~[na:1.8.0_212]
位于org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)[app.jar:1.1.3-SNAPSHOT]
在org.springframework.boot.loader.Launcher.launch(Launcher.java:109)[app.jar:1.1.3-SNAPSHOT]
在org.springframework.boot.loader.Launcher.launch(Launcher.java:58)[app.jar:1.1.3-SNAPSHOT]
位于org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88)[app.jar:1.1.3-SNAPSHOT]
原因:org.springframework.web.client.HttpServerErrorException$InternalServerError:500内部服务器错误:[{“时间戳”:“2020-10-07T12:53:51.771+0000”,“状态”:500,“错误”:“内部服务器错误”,“消息”:无法为config=service name profile=a,b,dev label=includeOrigin=true构造上下文;嵌套异常为java.lang.NullPointerException,“路径”:“/path to config/service name/a,b,dev”}]
在org.springframework.web.client.HttpServerErrorException.create(HttpServerErrorException.java:100)~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:186)~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:125)~[spring-web-5.2.8.RELEASE.jar!/:5.2.8.RELEASE]
在org.springframework.web.client.ResponseErrorHandler.handleError(ResponseErrorHandler.java:63)~[spring]-