springCloud启动报错 Request execution error
2019-11-14 16:05:25.000 INFO 7793 --- [main] c.n.d.DiscoveryClient: Getting all instance registry info from the eureka server2019-11-14 16:05:25.036 ERROR 7793 --- [ ...
2019-11-14 16:05:25.000 INFO 7793 --- [ main] c.n.d.DiscoveryClient : Getting all instance registry info from the eureka server
2019-11-14 16:05:25.036 ERROR 7793 --- [ main] c.n.d.s.t.d.RedirectingEurekaHttpClient : Request execution error
com.sun.jersey.api.client.ClientHandlerException: java.net.ConnectException: Connection refused (Connection refused)
at com.sun.jersey.client.apache4.ApacheHttpClient4Handler.handle(ApacheHttpClient4Handler.java:187) ~[jersey-apache-client4-1.19.1.jar:1.19.1]
at com.sun.jersey.api.client.filter.GZIPContentEncodingFilter.handle(GZIPContentEncodingFilter.java:123) ~[jersey-client-1.19.1.jar:1.19.1]
at com.netflix.discovery.EurekaIdentityHeaderFilter.handle(EurekaIdentityHeaderFilter.java:27) ~[eureka-client-
发现每次启动的时候默认都是8080,并不是我在配置文件application.yml配置的端口
原因:
1.target的文件下面没有 application.yml,所以启动的时候不会扫描到配置文件,就会默认使用8080端口
正确的应该是如下图:
2. application.yml 文件中有一行配置:spring.profile: local,删除就可以了
解决方案:
1.重新编译一下该模块
更多推荐
所有评论(0)