Questions tagged [spring-cloud]

Spring Cloud provides tools to quickly build common patterns in distributed systems (e.g. configuration management, service discovery, circuit breaker, intelligent routing, micro-proxy, control bus, global locks, leadership election, distributed sessions). Coordination of these systems leads to boiler plate patterns, and using Spring Cloud you can quickly create applications that implement those patterns.

Spring Cloud provides tools for developers to quickly build some of the common patterns in distributed systems (e.g. configuration management, service discovery, circuit breakers, intelligent routing, micro-proxy, control bus, one-time tokens, global locks, leadership election, distributed sessions, cluster state). Coordination of distributed systems leads to boiler plate patterns, and using Spring Cloud developers can quickly stand up services and applications that implement those patterns. They will work well in any distributed environment, including the developer's own laptop, bare metal data centres, and managed platforms such as Cloud Foundry.

5046 questions
19
votes
2 answers

Spring Cloud Feign: Is Feign efficient enough compared with RestTemplate?

I quickly browsed the source code of Feign, I found that Feign uses JDK's HttpUrlConnection to issue HTTP request and close it when request finished without using a connection pool. I doubt the efficiency of this kind of manner. Then I read the…
Neo
  • 2,196
  • 5
  • 32
  • 58
19
votes
5 answers

Get failure exception in @HystrixCommand fallback method

Is there a way to get the reason a HystrixCommand failed when using the @HystrixCommand annotation within a Spring Boot application? It looks like if you implement your own HystrixCommand, you have access to the getFailedExecutionException but how…
Andrew Serff
  • 2,117
  • 4
  • 21
  • 32
19
votes
3 answers

NetflixOSS Zuul Filter for rejecting requests

I am trying to use a ZuulFilter in a simple spring-cloud-Netflix Api gateway (reverse proxy) in order to authenticate requests against a custom authentication provider (via Rest call). The Filter should reject unauthorized requests with a 401 and…
Thomas Jäckle
  • 1,123
  • 2
  • 7
  • 21
19
votes
5 answers

Spring Cloud Config Server Shared Properties Across Applications

I currently have a number of deployable applications that work in a distributed fashion to solve a business problem. We are currently using a number of property configuration files to provide changing configuration per environment based off a system…
Jeffxor
  • 231
  • 1
  • 2
  • 6
19
votes
1 answer

Can I force Eureka registrations to use an ip address instead of a hostname?

I have a standalone, embedded Eureka server powered by Spring Boot 1.2.0.RELEASE and Spring Cloud 1.0.0.RC1. I see services properly registering themselves in the dashboard, which is great. The status links are using the host name of the box they…
user1836542
  • 354
  • 1
  • 3
  • 9
18
votes
3 answers

Spring Cloud Gateway inject header

In the GatewayFilter, I am trying to inject a header into the request like below. @Override public Mono filter(ServerWebExchange exchange, GatewayFilterChain chain) { //DO SOME AUTHORIZATION OPERATIONS String jwt =…
thaneesh shanand
  • 453
  • 1
  • 5
  • 14
18
votes
4 answers

Authentication issue with repo accessed from Spring Cloud Config Server hosted on GitHub

I'm hosting a configuration in a repo on GitHub. If I keep the repo public all's good, but if I make it private I face: org.eclipse.jgit.errors.TransportException: https://github.com/my-user/my-repo: Authentication is required but no…
learnAndImprove
  • 1,339
  • 4
  • 15
  • 25
18
votes
4 answers

Spring Cloud Eureka with Config Server

What is the recommended configuration when running both Config Server with Eureka Server? Should Config Server be a client of Eureka? Or should Eureka be dependent on Config Server properties for its configuration? Or is both OK?
Turar
  • 1,511
  • 5
  • 17
  • 27
18
votes
3 answers

Is there a way to use Spring Cloud {cipher} in Spring Boot application config?

I have a Spring Boot app that is using Spring Cloud Config but I would like to encrypt the Spring Cloud Config password in the Spring Boot apps bootstrap.yml file. Is there a way to do this? Below is an example. Spring Boot app…
Brian Abston
  • 601
  • 3
  • 7
  • 15
18
votes
4 answers

Spring Cloud Config Server Can't locate PropertySource on startup

When I start my Spring Cloud Config Server I get the following error. Could not locate PropertySource: I/O error on GET request for "http://localhost:8888/configserver/default/master":Connection refused; nested exception is…
Brian Abston
  • 601
  • 3
  • 7
  • 15
17
votes
8 answers

Spring Boot API Gateway Unable to resolve name

Api calls via gateway throws java.net.UnknownHostException even though I am able to hit the application directly with the given hostname Spring Boot version : 2.4.2 Spring-cloud.version: 2020.0.1 Java version: 11 Note: Samething works with spring…
Anonymous
  • 325
  • 1
  • 3
  • 8
17
votes
5 answers

@RefreshScope and /refresh not working

I have tried to implement spring external configurations using Config Server. It is working fine for the very first time when the application is started but any changes to the properties file are not being reflected. I tried to use /refresh endpoint…
ASD
  • 325
  • 1
  • 2
  • 9
17
votes
2 answers

springboot could not found feignclient

ERROR INFO LIKE BELOW: *************************** APPLICATION FAILED TO START *************************** Description: Field helloAgent in com.example.client.controller.Hello required a bean of type 'com.example.common.agent.HelloAgent' that…
ajianzheng
  • 283
  • 2
  • 3
  • 11
17
votes
4 answers

How to read multiple config file from Spring Cloud Config Server

Spring cloud config server supports reading property files with name ${spring.application.name}.properties. However I have 2 properties files in my application. a.properties b.properties Can I get the config server to read both these properties…
wangbin
  • 276
  • 1
  • 3
  • 16
17
votes
1 answer

Listening to Eureka events

I have an Eureka server running on a local machine. Eureka clients are registered to this server. I am able to view the eureka dashboard to see the instances registered. Can I have an event listener on the server side that will be triggered when…