2020-06-30 09:17:45.851 ERROR 13236 --- [ main] c.a.cloud.nacos.NacosConfigProperties : create config service error!properties=NacosConfigProperties{serverAddr='null', encode='null', group='DEFAULT_GROUP', prefix='null', fileExtension='properties', timeout=3000, endpoint='null', namespace='49308fa8-6a11-4219-9710-2c5ca7b45066', accessKey='null', secretKey='null', contextPath='null', clusterName='null', name='null', sharedDataids='null', refreshableDataids='null', extConfig=null},e=,
com.alibaba.nacos.api.exception.NacosException: java.lang.reflect.InvocationTargetException
at com.alibaba.nacos.api.config.ConfigFactory.createConfigService(ConfigFactory.java:45) ~[nacos-api-1.1.1.jar:na]
at com.alibaba.nacos.api.NacosFactory.createConfigService(NacosFactory.java:43) ~[nacos-api-1.1.1.jar:na]
at com.alibaba.cloud.nacos.NacosConfigProperties.configServiceInstance(NacosConfigProperties.java:346) ~[spring-cloud-alibaba-nacos-config-2.1.0.RELEASE.jar:2.1.0.RELEASE]
at com.alibaba.cloud.nacos.client.NacosPropertySourceLocator.locate(NacosPropertySourceLocator.java:63) [spring-cloud-alibaba-nacos-config-2.1.0.RELEASE.jar:2.1.0.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.bootstrap.config.PropertySourceLocator.locateCollection(PropertySourceLocator.java:47) [spring-cloud-context-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.1.RELEASE.jar:2.3.1.RELEASE]
at org.springframework.boot.SpringApplication.prepareContext(SpringApplication.java:370) [spring-boot-2.3.1.RELEASE.jar:2.3.1.RELEASE]
找了一晚上加一早上的错误,最后发现是配置文件写错了
bootstrap.properties 中的服务器地址改为
spring.cloud.nacos.config.server-addr=127.0.0.1:8848