spring-cloud/spring-cloud-gateway

Provide Kotlin Extension Functions (with reified type) for GatewayFilterSpec

Open

#1,252 创建于 2019年8月18日

在 GitHub 查看
 (2 评论) (0 反应) (0 负责人)Java (3,204 fork)batch import
enhancementhelp wanted

仓库指标

Star
 (4,284 star)
PR 合并指标
 (平均合并 1天 21小时) (30 天内合并 18 个 PR)

描述

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

贡献者指南