blog-comments
blog-comments copied to clipboard
springcloud(六):配置中心git示例 - ityouknow's Blog
http://www.ityouknow.com//springcloud/2017/05/22/springcloud-config-git.html
随着线上项目变的日益庞大,每个项目都散落着各种配置文件,如果采用分布式的开发模式,需要的配置文件随着服务增加而不断增多。某一个基础服务信息变更,都会引起一系列的更新和重启,运维苦不堪言也容易出错。配置中心便是解决此类问题的灵丹妙药。
博主大神好, uri: https://github.com/ityouknow/spring-cloud-starter/ # 配置git仓库的地址 为什么这个uri可以定位到https://github.com/ityouknow/spring-cloud-examples ?
@githubtodj 博主大神好, uri: https://github.com/ityouknow/spring-cloud-starter/ # 配置git仓库的地址 为什么这个uri可以定位到https://github.com/ityouknow/spring-cloud-examples ?
因为是才能最初是spring-cloud-starter 最后改名成 spring-cloud-examples
我刚试了一下,自己用spring-cloud-starter/ 也可以定位到自己的spring-cloud-examples/,好神奇啊,有点懵啊,大神,这是不是个bug,哈哈
感觉有些小问题,前边配置文件中server端口是8004,到后文测试时使用的是8001...
Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
http://localhost:8001/neo-config/dev 中的propertySources是个空数组,我在github上也配置了config-repo了, 请问是什么原因?
请问为什么在spring-cloud-examples有一个config-repo, 在spring-cloud-config-git也还有一个config-repo, 请问两个都必须要有吗?
@wangjian5 Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
@wangjian5 Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
client端的pom文件中不能有spring-cloud-config-server这个jar,把这个去掉就好了
755543204@yuanjihui
为了更多的人能学到知识,我转载了,见谅啊!!!
在说明client 启动类注解那里,复制了一句是配置server启动类的内容
能讲下,config server 使用git 私服的配置吗,公司现在需要用私服搭建配置中心
authentication not supported gitlab 设置为public 项目? 坑一个?
博主真棒,解决了我启动报错的问题,666
Unregistering JMX-exposed beans
说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
@AresJian 说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
大兄弟,你这个解决了吗?一样的问题,怎么才能不使用默认的8888
java.lang.NullPointerException: null at org.springframework.cloud.config.server.support.GitCredentialsProviderFactory.createFor(GitCredentialsProviderFactory.java:93) ~[spring-cloud-config-server-2.0.2.RELEASE.jar:2.0.2.RELEASE]```
博主你好 启动clientserver后 访问config资源总是报这样的错误?不知道还有别的小伙伴遇到么? 找到类似的issue https://github.com/spring-cloud/spring-cloud-config/issues/1061 不确定是不是windows系统的问题
@xuan1990
@wangjian5 Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
这个问题解决了吗 我也是这个错误
@AresJian 说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
大兄弟,你这个解决了吗?一样的问题,怎么才能不使用默认的8888
configclient配置文件 加一个设置 spring.cloud.config.uri = http://localhost:8001 可以更改默认的8888端口
解决了 要先启动服务端 在启动客户端 单独起会报这个错
@xuan1990
@wangjian5 Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
这个问题解决了吗 我也是这个错误
pom文件不要引入eureka-server这个jar,要引入config-client。也就是不要第一个,要第二个,我的是这样解决的。
<!--<dependency>--> <!--<groupId>org.springframework.cloud</groupId>--> <!--<artifactId>spring-cloud-starter-netflix-eureka-server</artifactId>--> <!--</dependency>-->
<dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-config-client</artifactId> </dependency>
@wangjian5 Could not resolve placeholder 'neo.hello' in value "${neo.hello}" client端启动报错,找不到配置文件
maven应该引入org.springframework.cloud:spring-cloud-config-client,启动类只需要加@SpringBootApplication注解,这样客户端就可以自动发现server了,不需要其他操作
@mengday http://localhost:8001/neo-config/dev 中的propertySources是个空数组,我在github上也配置了config-repo了, 请问是什么原因?
你好这个问题找到答案了么? 我的也是这样
那个。。颜值高没看到在哪体现额
学会了,又学一招,nice
@xblPauling
@AresJian 说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
大兄弟,你这个解决了吗?一样的问题,怎么才能不使用默认的8888
@xblPauling
@AresJian 说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
大兄弟,你这个解决了吗?一样的问题,怎么才能不使用默认的8888
@wyzlove
@AresJian 说说我这边的情况,按照demo写的,启动之后 第一个warn是:Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/。然后下面第二个warn:Error creating bean with name 'helloController',接着就是error:Error creating bean with name 'helloController': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'ares.hello' in value "${ares.hello}",试过各种办法,求大神帮助
大兄弟,你这个解决了吗?一样的问题,怎么才能不使用默认的8888
configclient配置文件 加一个设置 spring.cloud.config.uri = http://localhost:8001 可以更改默认的8888端口
server.port=8002
@zuoshoudao
@mengday http://localhost:8001/neo-config/dev 中的propertySources是个空数组,我在github上也配置了config-repo了, 请问是什么原因?
你好这个问题找到答案了么? 我的也是这样
你看看你github配置的目录对了么?