Support lb:// url in FeingClient annotation
Los mantenedores suelen responder en 1 día
@OlgaMaciaszek ya está trabajando en esto.
Desde el 25/2/2021.
- #518 de @antechrestos — cerrado sin fusionar
Evaluación
Este issue todavía no se ha evaluado.
Descripción
Current behaviour
In a project where is used spring cloud gateway, feign client (with target put in configuration), we ended up having feign clients declared as follows
@FeignClient(name="${service.name:any-name}", url="${service.direct-url:}")
With configuration as follows
service:
name: service-id
# url: http://direct-url (only used when service discovery is not available)
This way we are able, by configuration, to either run in service discovery/load balancing mode and direct mode.
Proposal
I kind of like the way spring cloud gateway handle that by allowing lb:// protocol. Allowing this protocol in url attribute would allow the following implementation
@FeignClient(name="technical-name", url="${service.uri}")
with following configuration
service:
uri: "lb://service-id" # or "http//direct-url"
this way it will let common behaviour, allowing to have a common behaviour in url specification.
I spotted the code responsible for feign client building and think that it would be easily doable by
- only appending
http://ifurlattribute value does not match the[a-z]+://.*pattern - remove load balancing client if and only if
urlattribute does not starts withlb://
I am eager to implement it if you allow me to do so. I am also pleased to discuss about it and about any alternative I missed.
Thank you
- Lenguaje dominante
- Java
- Estrellas
- 1.3k
- Forks
- 834
- Merge medio
- 3 d 6 h
- PR fusionados (30 d)
- 14
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de spring-cloud/spring-cloud-openfeign
-
@RequestHeader overrides @PathVariable with the same nameQuizá libre de nuevo @rajeshvasa la tomó hace 11 días y no hay ningún pull request abierto. Abiertowaiting-for-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 64/100
spring-cloud/spring-cloud-openfeign#1465 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
question
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
spring-cloud/spring-cloud-openfeign#1392 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existAbiertofeedback-provided
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
spring-cloud/spring-cloud-openfeign#1379 · 5 comentarios ·
Los mantenedores suelen responder en 1 día
-
waiting-for-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
spring-cloud/spring-cloud-openfeign#1340 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
dependencies
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
spring-cloud/spring-cloud-openfeign#1334 · 11 comentarios · 4 reacciones ·
Los mantenedores suelen responder en 1 día
Todos los issues de spring-cloud/spring-cloud-openfeign
Issues similares
-
Add contributing guidePosiblemente ocupada @WadekarPrashant la tomó hoy. Abiertogood first issue
Dificultad 1/5 1-3 horas Aptitud para principiantes 88/100
jenkinsci/gitea-checks-plugin#382 · 1 comentario ·
-
enhancement infra
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Los mantenedores suelen responder en 1 día
-
5.0.x backport bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
spring-cloud/spring-cloud-function#1569 ·
Los mantenedores suelen responder en 1 día
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parentPosiblemente ocupada @olegz la tomó hoy. Abiertotask
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
spring-cloud/spring-cloud-stream#3355 ·
Los mantenedores suelen responder en 1 día
-
bug untriaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
opensearch-project/opensearch-java#2342 ·
Los mantenedores suelen responder en 1 día