From 16c8a07d7c8d39f5c677afbc189abe578d41d75a Mon Sep 17 00:00:00 2001 From: Biju Kunjummen Date: Wed, 28 Feb 2018 19:15:11 -0800 Subject: [PATCH] Derive kotlin version from parent (#212) --- spring-cloud-gateway-sample/pom.xml | 23 +++++++------------ .../cloud/gateway/sample/AdditionalRoutes.kt | 5 ++-- 2 files changed, 10 insertions(+), 18 deletions(-) diff --git a/spring-cloud-gateway-sample/pom.xml b/spring-cloud-gateway-sample/pom.xml index a8f72d13e..5d6347592 100644 --- a/spring-cloud-gateway-sample/pom.xml +++ b/spring-cloud-gateway-sample/pom.xml @@ -11,7 +11,6 @@ Spring Cloud Gateway Sample - 1.1.51 @@ -57,26 +56,27 @@ org.jetbrains.kotlin kotlin-stdlib - ${kotlin.version} true org.jetbrains.kotlin kotlin-reflect - ${kotlin.version} true - kotlin-maven-plugin + org.springframework.boot + spring-boot-maven-plugin + + org.jetbrains.kotlin - ${kotlin.version} + kotlin-maven-plugin - - spring - + + -Xjsr305=strict + 1.8 @@ -107,13 +107,6 @@ - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - org.apache.maven.plugins diff --git a/spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt b/spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt index 96ac87df9..e24f4715a 100644 --- a/spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt +++ b/spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt @@ -1,6 +1,5 @@ package org.springframework.cloud.gateway.sample -import org.springframework.cloud.gateway.route.RouteLocator import org.springframework.cloud.gateway.route.builder.RouteLocatorBuilder import org.springframework.cloud.gateway.route.builder.filters import org.springframework.cloud.gateway.route.builder.routes @@ -8,10 +7,10 @@ import org.springframework.context.annotation.Bean import org.springframework.context.annotation.Configuration @Configuration -class AdditionalRoutes { +open class AdditionalRoutes { @Bean - fun additionalRouteLocator(builder: RouteLocatorBuilder): RouteLocator = builder.routes { + open fun additionalRouteLocator(builder: RouteLocatorBuilder) = builder.routes { route(id = "test-kotlin") { host("kotlin.abc.org") and path("/image/png") filters {