Support lb:// url in FeingClient annotation
Maintainer thường phản hồi trong vòng 1 ngày
@OlgaMaciaszek đang làm issue này rồi.
Từ ngày 25/2/2021.
- #518 của @antechrestos — đã đóng, không merge
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Java
- Star
- 1.3k
- Fork
- 834
- Merge trung bình
- 3 ngày 6 giờ
- Pull request đã merge (30 ngày)
- 14
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của spring-cloud/spring-cloud-openfeign
-
@RequestHeader overrides @PathVariable with the same nameCó thể làm lại được @rajeshvasa đã nhận 11 ngày trước và không có pull request nào đang mở. Đang mởwaiting-for-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 64/100
spring-cloud/spring-cloud-openfeign#1465 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
question
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
spring-cloud/spring-cloud-openfeign#1392 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
FeignClientsConfiguration$MicrometerConfiguration.class cannot be opened because it does not existĐang mởfeedback-provided
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
spring-cloud/spring-cloud-openfeign#1379 · 5 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
waiting-for-triage
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
spring-cloud/spring-cloud-openfeign#1340 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dependencies
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
spring-cloud/spring-cloud-openfeign#1334 · 11 bình luận · 4 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của spring-cloud/spring-cloud-openfeign
Issue tương tự
-
Add contributing guideCó thể đã có người làm @WadekarPrashant đã nhận hôm nay. Đang mởgood first issue
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
jenkinsci/gitea-checks-plugin#382 · 1 bình luận ·
-
enhancement infra
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
Maintainer thường phản hồi trong vòng 1 ngày
-
5.0.x backport bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
spring-cloud/spring-cloud-function#1569 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Move the spring-cloud-commons version and BOM import from the bus parent to the stream parentCó thể đã có người làm @olegz đã nhận hôm nay. Đang mởtask
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
spring-cloud/spring-cloud-stream#3355 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
opensearch-project/opensearch-java#2342 ·
Maintainer thường phản hồi trong vòng 1 ngày