spring-cloud

How can I change the feign URL during the runtime?

本小妞迷上赌 提交于 2019-12-09 06:27:17
问题 @FeignClient(name = "test", url="http://xxxx") How can I change the feign URL (url="http://xxxx") during the runtime? because the URL can only be determined at run time. 回答1: Feign has a way to provide the dynamic URLs and endpoints at runtime. The following steps have to be followed: In the FeignClient interface we have to remove the URL parameter. We have to use @RequestLine annotation to mention the REST method (GET, PUT, POST, etc.): @FeignClient(name="customerProfileAdapter") public

Using spring cloud feign causes java.lang.NoClassDefFoundError: feign/Logger

浪尽此生 提交于 2019-12-08 17:03:40
问题 I enabled my spring cloud for feignClients like this: @Configuration @EnableAutoConfiguration @RestController @EnableEurekaClient @EnableCircuitBreaker @EnableFeignClients public class SpringCloudConfigClientApplication { } But as oon as I add enableFeignClients, I got this error during compilation, java.lang.NoClassDefFoundError: feign/Logger at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2688) at java.lang.Class

Too many LOGS getting generated for Hystrix-AMQP

时光毁灭记忆、已成空白 提交于 2019-12-08 15:26:43
问题 so I added the dependency for Hystrix-AMQP to my service and the log file is going crazy it just keep on logging metrics stuff. I need that jar to actually use it with turbine-AMQP. here is what i have in my gradle for hystrix:- compile ("org.springframework.cloud:spring-cloud-starter-hystrix:1.0.6.RELEASE") compile ('org.springframework.cloud:spring-cloud-starter-bus-amqp:1.0.6.RELEASE') compile ('org.springframework.cloud:spring-cloud-netflix-hystrix-amqp:1.0.7.RELEASE') compile ('com

Disable Spring Cloud AWS autoconfiguration for local development

 ̄綄美尐妖づ 提交于 2019-12-08 15:11:17
问题 I use the following Maven dependency which autoconfigures all necessary parameters to make my project work on AWS: <dependency> <groupId>org.springframework.cloud</groupId> <artifactId>spring-cloud-starter-aws</artifactId> <version>1.2.2.RELEASE</version> </dependency> I don't have any critical functionality depending on AWS though, it's just to load a few files from S3 at runtime. So during local development (and also testing), I don't need any AWS autoconfiguration. The logical error I get

Spring 5 Functional Web Framework is not working with Eureka Client

心不动则不痛 提交于 2019-12-08 14:19:44
问题 Spring 5 Functional Web Framework is not working when I enable Microservice environment { Config-Server, Service-Registry(Eureka), Gateway(Zuul) } I've a Maven + Spring Boot(v. 2.0.0.M3) + Spring Cloud(v. Finchley.M2) + JDO (DataNucleus) + MySQL application with Annotation based Rest Controller as well as Web Functional based RouterFunction. When I run my application Without Eureka Client Dependency. Everything works fine, My Annotation based & Functional calls working smoothly.. <dependency>

NoClassDefFoundError: NameCoder at Spring Cloud Brixton.SR7 and Spring Cloud Camden.SR3

旧时模样 提交于 2019-12-08 14:00:04
问题 For all the Camden releases and now on the Brixton.SR7 as well, the following issue related to the Eureka Client occurs when starting the Spring Boot app: java.lang.NoClassDefFoundError: com/thoughtworks/xstream/io/naming/NameCoder For an instance I have a Spring Boot app having the @EnableDiscoveryClient annotation... Lately I’ve been changing the Spring Cloud dependencies back to Brixton.SR6 in order to get rid of this error. Certainly, I want to use the latest versions of the Spring Cloud

CF Spring boot app failed to start accepting connections

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-08 11:52:22
问题 I have developed a Spring boot application connecting to Postgresql instance running on my local. Now i deployed the application to Cloud foundry local bosh lite installation. I created one user provided service for postgresql and bound it to my application. The app is working fine till now. Then i wanted to make this application as a service broker. So i again used spring boot cloud foundry service broker. And implemented my code same as the sample mongodb spring boot service broker. https:/

ZuulException (SendErrorFilter) at first call

帅比萌擦擦* 提交于 2019-12-08 08:57:27
I am building an application by Spring Cloud ,Spring Boot and Docker. Entire application is working fine. I have couple of micro-services. Each of the project is running on Docker. When I try to consume my micro-services through Zuul API Gateway I am getting an error for the 1st call. But if I refresh the browser it's working fine. The error is given below-- 2019-03-10 04:54:55.440 WARN [netflix- zuul-api-gateway- server,1855093598d4f99c,1855093598d4f99c true] 1 --- [nio-8765-exec-1] o.s.c.n.z.filters.post.SendErrorFilter : Error during filtering com.netflix.zuul.exception.ZuulException at org

How Spring Cloud Config Server PUSH plain text files to Config Client Application?

最后都变了- 提交于 2019-12-08 08:52:50
问题 What I have implemented so far are: Spring Cloud Config Server with "native" repo. spring.profiles.active: native spring.cloud.config.server.native.searchLocations: file:/path/to/config-repo Config Server is pushing notification to Config Client App through RabbitMQ, as http://cloud.spring.io/spring-cloud-config/spring-cloud-config.html#_push_notifications_and_spring_cloud_bus Config Client App has @RefreshScope annotated on Service bean. So /config-repo has 3 files - application.yaml, client

How to activate /turbine.stream endpoint in a standalone Turbine application

坚强是说给别人听的谎言 提交于 2019-12-08 07:37:51
问题 I am trying to create a standalone application to collect Hystrix stream from other applications. But it does not expose the /turbine.stream endpoint by default. I am sure what is missing in my project. Spring Boot: 2.0.4.RELEASE, Spring Cloud: Finchley.SR1 The application class: @SpringBootApplication @EnableDiscoveryClient @EnableTurbine public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } } The content of applicaiton