微服务A读配置中心报Could not locate PropertySource错误

项目场景:

SpringCloud 搭建之微服务A通过配置中心(微服务)读取本地git仓库的配置文件microservice-a.properties


问题描述:

配置中心微服务config-server启动成后,在启动微服务A时,报如下错误:

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\Program Files\IntelliJ IDEA 2020.1\lib\idea_rt.jar=50402:D:\Program Files\IntelliJ IDEA 2020.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\java\jdk1.8.0_202\jre\lib\charsets.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\deploy.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\access-bridge-64.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\cldrdata.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\dnsns.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\jaccess.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\jfxrt.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\localedata.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\nashorn.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunec.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunjce_provider.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunmscapi.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunpkcs11.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\zipfs.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\javaws.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jce.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jfr.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jfxswt.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jsse.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\management-agent.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\plugin.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\resources.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\rt.jar;D:\workspace\SpringCloud\microservice-a\target\classes;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-web\2.3.0.RELEASE\spring-boot-starter-web-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter\2.3.0.RELEASE\spring-boot-starter-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot\2.3.0.RELEASE\spring-boot-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-autoconfigure\2.3.0.RELEASE\spring-boot-autoconfigure-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-logging\2.3.0.RELEASE\spring-boot-starter-logging-2.3.0.RELEASE.jar;D:\repository\SpringBoot\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\SpringBoot\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\SpringBoot\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.2.jar;D:\repository\SpringBoot\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.2.jar;D:\repository\SpringBoot\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\repository\SpringBoot\org\springframework\spring-core\5.2.6.RELEASE\spring-core-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-jcl\5.2.6.RELEASE\spring-jcl-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-json\2.3.0.RELEASE\spring-boot-starter-json-2.3.0.RELEASE.jar;D:\repository\SpringBoot\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.0\jackson-datatype-jdk8-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.0\jackson-datatype-jsr310-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.0\jackson-module-parameter-names-2.11.0.jar;D:\repository\SpringBoot\org\springframework\spring-web\5.2.6.RELEASE\spring-web-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-beans\5.2.6.RELEASE\spring-beans-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-webmvc\5.2.6.RELEASE\spring-webmvc-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-context\5.2.6.RELEASE\spring-context-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-expression\5.2.6.RELEASE\spring-expression-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-tomcat\2.3.0.RELEASE\spring-boot-starter-tomcat-2.3.0.RELEASE.jar;D:\repository\SpringBoot\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\repository\SpringBoot\org\apache\tomcat\embed\tomcat-embed-core\9.0.35\tomcat-embed-core-9.0.35.jar;D:\repository\SpringBoot\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\repository\SpringBoot\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.35\tomcat-embed-websocket-9.0.35.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-security\2.3.0.RELEASE\spring-boot-starter-security-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-aop\5.2.6.RELEASE\spring-aop-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-config\5.3.2.RELEASE\spring-security-config-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-core\5.3.2.RELEASE\spring-security-core-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-web\5.3.2.RELEASE\spring-security-web-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-actuator\2.3.0.RELEASE\spring-boot-starter-actuator-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-actuator-autoconfigure\2.3.0.RELEASE\spring-boot-actuator-autoconfigure-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-actuator\2.3.0.RELEASE\spring-boot-actuator-2.3.0.RELEASE.jar;D:\repository\SpringBoot\io\micrometer\micrometer-core\1.5.1\micrometer-core-1.5.1.jar;D:\repository\SpringBoot\org\hdrhistogram\HdrHistogram\2.1.12\HdrHistogram-2.1.12.jar;D:\repository\SpringBoot\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;D:\repository\SpringBoot\io\springfox\springfox-boot-starter\3.0.0\springfox-boot-starter-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-oas\3.0.0\springfox-oas-3.0.0.jar;D:\repository\SpringBoot\io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.jar;D:\repository\SpringBoot\io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.jar;D:\repository\SpringBoot\io\springfox\springfox-spi\3.0.0\springfox-spi-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-schema\3.0.0\springfox-schema-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-core\3.0.0\springfox-core-3.0.0.jar;D:\repository\SpringBoot\net\bytebuddy\byte-buddy\1.10.10\byte-buddy-1.10.10.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-web\3.0.0\springfox-spring-web-3.0.0.jar;D:\repository\SpringBoot\io\github\classgraph\classgraph\4.8.83\classgraph-4.8.83.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-webmvc\3.0.0\springfox-spring-webmvc-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-webflux\3.0.0\springfox-spring-webflux-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger-common\3.0.0\springfox-swagger-common-3.0.0.jar;D:\repository\SpringBoot\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;D:\repository\SpringBoot\io\springfox\springfox-data-rest\3.0.0\springfox-data-rest-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-bean-validators\3.0.0\springfox-bean-validators-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger2\3.0.0\springfox-swagger2-3.0.0.jar;D:\repository\SpringBoot\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;D:\repository\SpringBoot\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger-ui\3.0.0\springfox-swagger-ui-3.0.0.jar;D:\repository\SpringBoot\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\repository\SpringBoot\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\repository\SpringBoot\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;D:\repository\SpringBoot\org\apache\commons\commons-lang3\3.11\commons-lang3-3.11.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-starter-config\2.2.2.RELEASE\spring-cloud-starter-config-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-starter\2.2.2.RELEASE\spring-cloud-starter-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-context\2.2.2.RELEASE\spring-cloud-context-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-crypto\5.3.2.RELEASE\spring-security-crypto-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-commons\2.2.2.RELEASE\spring-cloud-commons-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-rsa\1.0.9.RELEASE\spring-security-rsa-1.0.9.RELEASE.jar;D:\repository\SpringBoot\org\bouncycastle\bcpkix-jdk15on\1.64\bcpkix-jdk15on-1.64.jar;D:\repository\SpringBoot\org\bouncycastle\bcprov-jdk15on\1.64\bcprov-jdk15on-1.64.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-config-client\2.2.2.RELEASE\spring-cloud-config-client-2.2.2.RELEASE.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.0.jar" com.dzy.springcloud.microservicea.MicroserviceAApplication.   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::        (v2.3.0.RELEASE)2021-02-14 21:52:38.417  INFO 9628 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2021-02-14 21:52:38.593  WARN 9628 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Could not locate PropertySource: Could not extract response: no suitable HttpMessageConverter found for response type [class org.springframework.cloud.config.environment.Environment] and content type [text/html;charset=UTF-8]
2021-02-14 21:52:38.595  INFO 9628 --- [           main] c.d.s.m.MicroserviceAApplication         : No active profile set, falling back to default profiles: default
2021-02-14 21:52:39.524  INFO 9628 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=20251c2a-5be0-3cd3-b2c5-4fa35ecd32b1
2021-02-14 21:52:39.741  INFO 9628 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-02-14 21:52:39.746  INFO 9628 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-02-14 21:52:39.746  INFO 9628 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.35]
2021-02-14 21:52:39.842  INFO 9628 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-02-14 21:52:39.842  INFO 9628 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1203 ms
2021-02-14 21:52:40.002  WARN 9628 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messagesController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'application.message' in value "${application.message}"
2021-02-14 21:52:40.004  INFO 9628 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2021-02-14 21:52:40.019  INFO 9628 --- [           main] ConditionEvaluationReportLoggingListener : Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-14 21:52:40.026 ERROR 9628 --- [           main] o.s.boot.SpringApplication               : Application run failedorg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'messagesController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'application.message' in value "${application.message}"at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:405) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1422) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:895) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at com.dzy.springcloud.microservicea.MicroserviceAApplication.main(MicroserviceAApplication.java:15) [classes/:na]
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'application.message' in value "${application.message}"at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:178) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:124) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:236) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:210) ~[spring-core-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.lambda$processProperties$0(PropertySourcesPlaceholderConfigurer.java:175) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:912) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:130) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]... 18 common frames omitted2021-02-14 21:52:40.035  WARN 9628 --- [           main] o.s.boot.SpringApplication               : Unable to close ApplicationContextorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'springApplicationAdminRegistrar' defined in class path resource [org/springframework/boot/autoconfigure/admin/SpringApplicationAdminJmxAutoConfiguration.class]: Unsatisfied dependency expressed through method 'springApplicationAdminRegistrar' parameter 1; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.env.Environment' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:798) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:539) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.event.AbstractApplicationEventMulticaster.retrieveApplicationListeners(AbstractApplicationEventMulticaster.java:245) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.event.AbstractApplicationEventMulticaster.getApplicationListeners(AbstractApplicationEventMulticaster.java:197) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:134) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:403) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:81) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.availability.AvailabilityChangeEvent.publish(AvailabilityChangeEvent.java:67) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.doClose(ServletWebServerApplicationContext.java:167) ~[spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:978) ~[spring-context-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:814) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:325) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) [spring-boot-2.3.0.RELEASE.jar:2.3.0.RELEASE]at com.dzy.springcloud.microservicea.MicroserviceAApplication.main(MicroserviceAApplication.java:15) [classes/:na]
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.core.env.Environment' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1716) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1272) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1226) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:885) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:789) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.RELEASE]... 23 common frames omittedProcess finished with exit code 1

原因分析:

config-server微服务的pom文件中加了基本权限校验:

<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-security</artifactId></dependency>
</font>

微服务A访问config-server时,没有带Basic Auth的用户和密码访问。


解决方案:

方案1、去掉config-server的pom中的基本权限校验依赖。 微服务A重新启动如下:

"C:\Program Files\Java\jdk1.8.0_202\bin\java.exe" -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true "-javaagent:D:\Program Files\IntelliJ IDEA 2020.1\lib\idea_rt.jar=50497:D:\Program Files\IntelliJ IDEA 2020.1\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\java\jdk1.8.0_202\jre\lib\charsets.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\deploy.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\access-bridge-64.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\cldrdata.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\dnsns.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\jaccess.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\jfxrt.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\localedata.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\nashorn.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunec.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunjce_provider.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunmscapi.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\sunpkcs11.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\ext\zipfs.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\javaws.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jce.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jfr.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jfxswt.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\jsse.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\management-agent.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\plugin.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\resources.jar;C:\Program Files\java\jdk1.8.0_202\jre\lib\rt.jar;D:\workspace\SpringCloud\microservice-a\target\classes;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-web\2.3.0.RELEASE\spring-boot-starter-web-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter\2.3.0.RELEASE\spring-boot-starter-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot\2.3.0.RELEASE\spring-boot-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-autoconfigure\2.3.0.RELEASE\spring-boot-autoconfigure-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-logging\2.3.0.RELEASE\spring-boot-starter-logging-2.3.0.RELEASE.jar;D:\repository\SpringBoot\ch\qos\logback\logback-classic\1.2.3\logback-classic-1.2.3.jar;D:\repository\SpringBoot\ch\qos\logback\logback-core\1.2.3\logback-core-1.2.3.jar;D:\repository\SpringBoot\org\apache\logging\log4j\log4j-to-slf4j\2.13.2\log4j-to-slf4j-2.13.2.jar;D:\repository\SpringBoot\org\apache\logging\log4j\log4j-api\2.13.2\log4j-api-2.13.2.jar;D:\repository\SpringBoot\org\slf4j\jul-to-slf4j\1.7.30\jul-to-slf4j-1.7.30.jar;D:\repository\SpringBoot\org\springframework\spring-core\5.2.6.RELEASE\spring-core-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-jcl\5.2.6.RELEASE\spring-jcl-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\yaml\snakeyaml\1.26\snakeyaml-1.26.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-json\2.3.0.RELEASE\spring-boot-starter-json-2.3.0.RELEASE.jar;D:\repository\SpringBoot\com\fasterxml\jackson\datatype\jackson-datatype-jdk8\2.11.0\jackson-datatype-jdk8-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\datatype\jackson-datatype-jsr310\2.11.0\jackson-datatype-jsr310-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\module\jackson-module-parameter-names\2.11.0\jackson-module-parameter-names-2.11.0.jar;D:\repository\SpringBoot\org\springframework\spring-web\5.2.6.RELEASE\spring-web-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-beans\5.2.6.RELEASE\spring-beans-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-webmvc\5.2.6.RELEASE\spring-webmvc-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-context\5.2.6.RELEASE\spring-context-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-expression\5.2.6.RELEASE\spring-expression-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-tomcat\2.3.0.RELEASE\spring-boot-starter-tomcat-2.3.0.RELEASE.jar;D:\repository\SpringBoot\jakarta\annotation\jakarta.annotation-api\1.3.5\jakarta.annotation-api-1.3.5.jar;D:\repository\SpringBoot\org\apache\tomcat\embed\tomcat-embed-core\9.0.35\tomcat-embed-core-9.0.35.jar;D:\repository\SpringBoot\org\glassfish\jakarta.el\3.0.3\jakarta.el-3.0.3.jar;D:\repository\SpringBoot\org\apache\tomcat\embed\tomcat-embed-websocket\9.0.35\tomcat-embed-websocket-9.0.35.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-security\2.3.0.RELEASE\spring-boot-starter-security-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\spring-aop\5.2.6.RELEASE\spring-aop-5.2.6.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-config\5.3.2.RELEASE\spring-security-config-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-core\5.3.2.RELEASE\spring-security-core-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-web\5.3.2.RELEASE\spring-security-web-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-starter-actuator\2.3.0.RELEASE\spring-boot-starter-actuator-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-actuator-autoconfigure\2.3.0.RELEASE\spring-boot-actuator-autoconfigure-2.3.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\boot\spring-boot-actuator\2.3.0.RELEASE\spring-boot-actuator-2.3.0.RELEASE.jar;D:\repository\SpringBoot\io\micrometer\micrometer-core\1.5.1\micrometer-core-1.5.1.jar;D:\repository\SpringBoot\org\hdrhistogram\HdrHistogram\2.1.12\HdrHistogram-2.1.12.jar;D:\repository\SpringBoot\org\latencyutils\LatencyUtils\2.0.3\LatencyUtils-2.0.3.jar;D:\repository\SpringBoot\io\springfox\springfox-boot-starter\3.0.0\springfox-boot-starter-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-oas\3.0.0\springfox-oas-3.0.0.jar;D:\repository\SpringBoot\io\swagger\core\v3\swagger-annotations\2.1.2\swagger-annotations-2.1.2.jar;D:\repository\SpringBoot\io\swagger\core\v3\swagger-models\2.1.2\swagger-models-2.1.2.jar;D:\repository\SpringBoot\io\springfox\springfox-spi\3.0.0\springfox-spi-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-schema\3.0.0\springfox-schema-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-core\3.0.0\springfox-core-3.0.0.jar;D:\repository\SpringBoot\net\bytebuddy\byte-buddy\1.10.10\byte-buddy-1.10.10.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-web\3.0.0\springfox-spring-web-3.0.0.jar;D:\repository\SpringBoot\io\github\classgraph\classgraph\4.8.83\classgraph-4.8.83.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-webmvc\3.0.0\springfox-spring-webmvc-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-spring-webflux\3.0.0\springfox-spring-webflux-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger-common\3.0.0\springfox-swagger-common-3.0.0.jar;D:\repository\SpringBoot\org\mapstruct\mapstruct\1.3.1.Final\mapstruct-1.3.1.Final.jar;D:\repository\SpringBoot\io\springfox\springfox-data-rest\3.0.0\springfox-data-rest-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-bean-validators\3.0.0\springfox-bean-validators-3.0.0.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger2\3.0.0\springfox-swagger2-3.0.0.jar;D:\repository\SpringBoot\io\swagger\swagger-annotations\1.5.20\swagger-annotations-1.5.20.jar;D:\repository\SpringBoot\io\swagger\swagger-models\1.5.20\swagger-models-1.5.20.jar;D:\repository\SpringBoot\io\springfox\springfox-swagger-ui\3.0.0\springfox-swagger-ui-3.0.0.jar;D:\repository\SpringBoot\com\fasterxml\classmate\1.5.1\classmate-1.5.1.jar;D:\repository\SpringBoot\org\slf4j\slf4j-api\1.7.30\slf4j-api-1.7.30.jar;D:\repository\SpringBoot\org\springframework\plugin\spring-plugin-core\2.0.0.RELEASE\spring-plugin-core-2.0.0.RELEASE.jar;D:\repository\SpringBoot\org\springframework\plugin\spring-plugin-metadata\2.0.0.RELEASE\spring-plugin-metadata-2.0.0.RELEASE.jar;D:\repository\SpringBoot\org\apache\commons\commons-lang3\3.11\commons-lang3-3.11.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-starter-config\2.2.2.RELEASE\spring-cloud-starter-config-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-starter\2.2.2.RELEASE\spring-cloud-starter-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-context\2.2.2.RELEASE\spring-cloud-context-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-crypto\5.3.2.RELEASE\spring-security-crypto-5.3.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-commons\2.2.2.RELEASE\spring-cloud-commons-2.2.2.RELEASE.jar;D:\repository\SpringBoot\org\springframework\security\spring-security-rsa\1.0.9.RELEASE\spring-security-rsa-1.0.9.RELEASE.jar;D:\repository\SpringBoot\org\bouncycastle\bcpkix-jdk15on\1.64\bcpkix-jdk15on-1.64.jar;D:\repository\SpringBoot\org\bouncycastle\bcprov-jdk15on\1.64\bcprov-jdk15on-1.64.jar;D:\repository\SpringBoot\org\springframework\cloud\spring-cloud-config-client\2.2.2.RELEASE\spring-cloud-config-client-2.2.2.RELEASE.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-annotations\2.11.0\jackson-annotations-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-databind\2.11.0\jackson-databind-2.11.0.jar;D:\repository\SpringBoot\com\fasterxml\jackson\core\jackson-core\2.11.0\jackson-core-2.11.0.jar" com.dzy.springcloud.microservicea.MicroserviceAApplication.   ____          _            __ _ _/\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \\\/  ___)| |_)| | | | | || (_| |  ) ) ) )'  |____| .__|_| |_|_| |_\__, | / / / /=========|_|==============|___/=/_/_/_/:: Spring Boot ::        (v2.3.0.RELEASE)2021-02-14 22:00:09.097  INFO 14036 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Fetching config from server at : http://localhost:8888
2021-02-14 22:00:10.951  INFO 14036 --- [           main] c.c.c.ConfigServicePropertySourceLocator : Located environment: name=microservice-a, profiles=[default], label=null, version=39ce958d021515173a25821e77de12ddccaccea1, state=null
2021-02-14 22:00:10.952  INFO 14036 --- [           main] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-configClient'}, BootstrapPropertySource {name='bootstrapProperties-D:/F/git/microservice-a.properties'}]
2021-02-14 22:00:10.957  INFO 14036 --- [           main] c.d.s.m.MicroserviceAApplication         : No active profile set, falling back to default profiles: default
2021-02-14 22:00:11.810  INFO 14036 --- [           main] o.s.cloud.context.scope.GenericScope     : BeanFactory id=20251c2a-5be0-3cd3-b2c5-4fa35ecd32b1
2021-02-14 22:00:12.019  INFO 14036 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2021-02-14 22:00:12.024  INFO 14036 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2021-02-14 22:00:12.024  INFO 14036 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.35]
2021-02-14 22:00:12.135  INFO 14036 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2021-02-14 22:00:12.135  INFO 14036 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1167 ms
2021-02-14 22:00:12.564  INFO 14036 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2021-02-14 22:00:12.839  INFO 14036 --- [           main] o.s.s.web.DefaultSecurityFilterChain     : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@2693c618, org.springframework.security.web.context.SecurityContextPersistenceFilter@51a651c1, org.springframework.security.web.header.HeaderWriterFilter@7b1e5e55, org.springframework.web.filter.CorsFilter@3443e476, org.springframework.security.web.authentication.logout.LogoutFilter@760487aa, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@6c184d4d, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@5426cb36, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7ccfdaef, org.springframework.security.web.session.SessionManagementFilter@55b5cd2b, org.springframework.security.web.access.ExceptionTranslationFilter@38ee7a9d]
2021-02-14 22:00:12.860  INFO 14036 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Initializing ExecutorService 'applicationTaskExecutor'
2021-02-14 22:00:14.111  INFO 14036 --- [           main] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname
2021-02-14 22:00:14.258  INFO 14036 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat started on port(s): 8080 (http) with context path ''
2021-02-14 22:00:15.412  INFO 14036 --- [           main] o.s.cloud.commons.util.InetUtils         : Cannot determine local hostname
2021-02-14 22:00:15.903  INFO 14036 --- [           main] c.d.s.m.MicroserviceAApplication         : Started MicroserviceAApplication in 9.787 seconds (JVM running for 10.437)

方案2:config-server打开鉴权,微服务A的bootstrap.properties中增加basic鉴权配置

spring.application.name=microservice-a
# 配置中心
spring.cloud.config.uri=http://localhost:8888
# basic访问鉴权账号、密码
spring.cloud.config.username=访问配置中心需要的账号
spring.cloud.config.password=访问配置中心需要的密码# 默认是生产
# 读取开发环境配置文件
#spring.profiles.active=dev
# 读取测试环境配置文件
spring.profiles.active=stg

微服务A读配置中心报Could not locate PropertySource错误相关推荐

  1. spring cloud+dotnet core搭建微服务架构:配置中心续(五)

    前言 上一章最后讲了,更新配置以后需要重启客户端才能生效,这在实际的场景中是不可取的.由于目前Steeltoe配置的重载只能由客户端发起,没有实现处理程序侦听服务器更改事件,所以还没办法实现彻底实现这 ...

  2. 微服务-Nacos动态配置中心

    前言 回想之前的项目,尤其是项目分多模块的时候,一般就会有一个公共包大多是相关工具类,因为比较独立使得其他模块调用方便,现在出来个需求为工具类参数进行动态控制,比如Redis工具类动态设定过期时间,除 ...

  3. Spring Cloud Alibaba入门教程-05【Alibaba微服务组件Nacos配置中心】

    1. Nacos配置中心使用 官方文档: https://github.com/alibaba/spring­cloud­alibaba/wiki/Nacos­config Nacos 提供用于存储配 ...

  4. 最新版Spring Cloud Alibaba微服务架构-Config配置中心篇

    文章目录 前言 一.Config引入背景 1.文件相对分散 2.无法区分环境 3.无法实时更新 4.安全无法保证 二.Config引入配置 1.配置文件格式 1.1 命名空间(Namespace) 1 ...

  5. 微服务架构中配置中心的选择

    点击上方蓝色"方志朋",选择"设为星标" 回复"666"获取独家整理的学习资料! 来源:r6d.cn/XsTR 目前公司内部微服务架构基础设 ...

  6. SpringCloud微服务应用-config配置中心(介绍、搭建、动态刷新、测试)

    文章目录 前言 一.传统应用配置痛点 二.Config 配置中心介绍 三.服务端Config Server搭建 1.pom依赖 2.application启动类配置 3.application.yml ...

  7. python consul配置中心_微服务注册发现配置中心-consul

    Consul详解 近期在微服务业务中用的注册中心,在此简单记录下以备后用. 一 概述 1.1 概念 Consul 是 HashiCorp 公司推出的开源工具,用于实现分布式系统的服务发现与配置.Con ...

  8. spring cloud+dotnet core搭建微服务架构:配置中心(四)

    前言 我们项目中有很多需要配置的地方,最常见的就是各种服务URL地址,这些地址针对不同的运行环境还不一样,不管和打包还是部署都麻烦,需要非常的小心.一般配置都是存储到配置文件里面,不管多小的配置变动, ...

  9. SpringCloud微服务(四)——Nacos服务注册和配置中心

    SpringCloud Alibaba Nacos服务注册和配置中心 Spring Cloud Netflix Projects Entering Mainterance Mode SpringClo ...

最新文章

  1. mysql中logs库_MySQL Logs
  2. 互联网+时代,SAP助力跨境电商全面升级研讨会圆满落幕
  3. Android Manager
  4. 福建物联网产业发展势头良好
  5. Linux 系统应用编程——线程基础
  6. 重学java基础第十课:windows快捷键
  7. java获取操作系统信息
  8. php生成excel范例,支持任意行列
  9. 设计模式解密(7)- 代理模式
  10. Flutter:布局
  11. 微信私人心情录小程序源码
  12. Word批量转PDF,宏批量转PDF
  13. 零门槛修改微信步数(基于虚拟xposed)
  14. Python开发-面向对象编程-王大鹏-专题视频课程
  15. Python+Appium自动化之swipe()滑动页面
  16. ghost还原固态硬盘_高级格式化_固态硬盘到底能不能使用Ghost软件?终于说明白了...
  17. 机器学习中的概念---输入空间、标记空间、样本空间、假设空间、版本空间
  18. export和import
  19. struts2 漏洞测试工具
  20. cmake 基本命令 交叉编译配置 模块的编写

热门文章

  1. 拯救小明(多继承+友元)
  2. FFA 2022 专场解读 - Flink 核心技术
  3. 微信小程序积分商城接入兑吧
  4. 大型活动大规模人群的识别和疏散:从公交2.0到公交3.0
  5. Python 3 字符串 format( ) 方法
  6. 20210117noteexpress云端数据库经验分享
  7. 牛逼大了!腾讯官方的代码安全指南免费公开
  8. Pytorch中tensor.expand()和tensor.expand_as()函数
  9. Linux:如何调整ubuntu的系统界面使其放大
  10. 论文写作——韬ASMI29 introduction、related work两部分语句修改