spring-cloud/spring-cloud-gateway

Provide Kotlin Extension Functions (with reified type) for GatewayFilterSpec

Open

#1252 aperta il 18 ago 2019

Vedi su GitHub
 (2 commenti) (0 reazioni) (0 assegnatari)Java (3204 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (4284 star)
Metriche merge PR
 (Merge medio 1g 21h) (18 PR mergiate in 30 g)

Descrizione

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) { … }.

Guida contributor