320x100
kotlin 으로 작성되었습니다.
abstract class AbstractOrderedGatewayFilterFactory private constructor() : AbstractGatewayFilterFactory<Any>() {
private var order: Int = 0
constructor(order: Int) : this() {
this.order = order
}
override fun apply(config: Any?): GatewayFilter {
return OrderedGatewayFilter(GatewayFilter { exchange, chain -> chain.filter(exchange) }, order)
}
}
@Component
class CustomGatewayFilterFactory : AbstractOrderedGatewayFilterFactory(10) {
override fun apply(config: Any?) = GatewayFilter { exchange: ServerWebExchange, chain: GatewayFilterChain ->
// ...
}
}
참고 : https://github.com/spring-cloud/spring-cloud-gateway/issues/1122
320x100
'Back-End (web)' 카테고리의 다른 글
[Querydsl] between 조건. LocalDate to LocalDateTime (0) | 2020.08.05 |
---|---|
[intellij] google code 포매터 적용 (0) | 2020.07.11 |
[Spring] GatewayFilterFactory Unit Test (0) | 2020.07.02 |
[kotlin][coroutine] awaitRetrieve (0) | 2020.04.05 |
[JUnit5] @ParameterizedTest (0) | 2019.12.15 |
댓글