Browse Source

Derive kotlin version from parent (#212)

pull/214/head
Biju Kunjummen 7 years ago committed by Spencer Gibb
parent
commit
16c8a07d7c
  1. 23
      spring-cloud-gateway-sample/pom.xml
  2. 5
      spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt

23
spring-cloud-gateway-sample/pom.xml

@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
<description>Spring Cloud Gateway Sample</description>
<properties>
<kotlin.version>1.1.51</kotlin.version>
</properties>
<parent>
@ -57,26 +56,27 @@ @@ -57,26 +56,27 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-stdlib</artifactId>
<version>${kotlin.version}</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-reflect</artifactId>
<version>${kotlin.version}</version>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>kotlin-maven-plugin</artifactId>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<version>${kotlin.version}</version>
<artifactId>kotlin-maven-plugin</artifactId>
<configuration>
<compilerPlugins>
<plugin>spring</plugin>
</compilerPlugins>
<args>
<arg>-Xjsr305=strict</arg>
</args>
<jvmTarget>1.8</jvmTarget>
</configuration>
<executions>
@ -107,13 +107,6 @@ @@ -107,13 +107,6 @@
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-allopen</artifactId>
<version>${kotlin.version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>

5
spring-cloud-gateway-sample/src/main/kotlin/org/springframework/cloud/gateway/sample/AdditionalRoutes.kt

@ -1,6 +1,5 @@ @@ -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 @@ -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 {

Loading…
Cancel
Save