How can I change the feign URL during the runtime?

You can add an unannotated URI parameter (that can potentially be determined at runtime) and that will be the base path that will be used for the request. E.g.: @FeignClient(name = “dummy-name”, url = “https://this-is-a-placeholder.com”) public interface MyClient { @PostMapping(path = “/create”) UserDto createUser(URI baseUrl, @RequestBody UserDto userDto); } And then the usage will be: … Read more

What is Eureka service, Eureka Client, Eureka instance and Eureka server

Definitions Eureka Server The discovery server. It contains a registry of services and a REST api that can be used to register a service, deregister a service, and discover the location of other services. Eureka Service Any application that can be found in the Eureka Server’s registry and is discoverable by others. A service has … Read more

Is there a compatibility matrix of Spring-boot and Spring-cloud?

Updated in January 2023 Spring Cloud release train Spring Boot compatibility Compatibility Matrix Spring Cloud Spring Boot 2022.0.x aka Kilburn 3.0.x 2021.0.3+ aka Jubilee 2.6.x, 2.7.x 2021.0.x aka Jubilee 2.6.x 2020.0.3+ aka Ilford 2.4.x, 2.5.x 2020.0.x aka Ilford 2.4.x ⚠ Below Spring Cloud versions have all reached end of life status and are no longer … Read more

Understanding Spring Cloud Eureka Server self preservation and renew threshold

I got the same question as @codependent met, I googled a lot and did some experiment, here I come to contribute some knowledge about how Eureka server and instance work. Every instance needs to renew its lease to Eureka Server with frequency of one time per 30 seconds, which can be define in eureka.instance.leaseRenewalIntervalInSeconds. Renews … Read more

How is Spring Cloud Gateway different from Zuul?

I am the author of spring cloud gateway. Zuul is built on servlet 2.5 (works with 3.x), using blocking APIs. It doesn’t support any long lived connections, like websockets. Gateway is built on Spring Framework 5, Project Reactor and Spring Boot 2 using non-blocking APIs. Websockets are supported and it’s a much better developer experience … Read more

What’s the difference between EnableEurekaClient and EnableDiscoveryClient?

There are multiple implementations of “Discovery Service” (eureka, consul, zookeeper). @EnableDiscoveryClient lives in spring-cloud-commons and picks the implementation on the classpath. @EnableEurekaClient lives in spring-cloud-netflix and only works for eureka. If eureka is on your classpath, they are effectively the same.

What is the difference between putting a property on application.yml or bootstrap.yml in spring boot?

I have just asked the Spring Cloud guys and thought I should share the info I have here. bootstrap.yml is loaded before application.yml. It is typically used for the following: when using Spring Cloud Config Server, you should specify spring.application.name and spring.cloud.config.server.git.uri inside bootstrap.yml some encryption/decryption information Technically, bootstrap.yml is loaded by a parent Spring … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)