spring-cloud/spring-cloud-gateway

Provide Kotlin Extension Functions (with reified type) for GatewayFilterSpec

Open

#1.252 geöffnet am 18. Aug. 2019

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Java (3.204 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (4.284 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 1T 21h) (18 gemergte PRs in 30 T)

Beschreibung

GatewayFilterSpec (https://github.com/spring-cloud/spring-cloud-gateway/blob/master/spring-cloud-gateway-core/src/main/java/org/springframework/cloud/gateway/route/builder/GatewayFilterSpec.java) has the Java methods modifyRequestBody and modifyResponseBody with arguments of type Class<T>. It would be nice to have Kotlin Extension Functions with reified types just as implemented by @sdeleuze for the Spring Framework.

Then in Kotlin one could write e.g. modifyResponseBody<String, String> { … } instead of modifyResponseBody(String::class.java, String::class.java) { … }.

Contributor Guide