From d1715342e45eb393038cdf5211716f5cc2b88527 Mon Sep 17 00:00:00 2001 From: slavisa-baeldung Date: Sat, 3 Jun 2017 16:28:05 +0100 Subject: [PATCH] BAEL-755 - removing spring-boot-kotlin module --- pom.xml | 1 - spring-boot-kotlin/pom.xml | 151 ------------------ .../springbootkotlin/HelloController.kt | 23 --- .../com/baeldung/springbootkotlin/HelloDto.kt | 3 - .../baeldung/springbootkotlin/HelloService.kt | 11 -- .../springbootkotlin/KotlinDemoApplication.kt | 11 -- .../src/main/resource/application.properties | 0 .../KotlinDemoApplicationIntegrationTest.kt | 53 ------ 8 files changed, 253 deletions(-) delete mode 100644 spring-boot-kotlin/pom.xml delete mode 100644 spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloController.kt delete mode 100644 spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloDto.kt delete mode 100644 spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloService.kt delete mode 100644 spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/KotlinDemoApplication.kt delete mode 100644 spring-boot-kotlin/src/main/resource/application.properties delete mode 100644 spring-boot-kotlin/src/test/kotlin/springbootkotlin/KotlinDemoApplicationIntegrationTest.kt diff --git a/pom.xml b/pom.xml index e6e11326d7..8719d268c6 100644 --- a/pom.xml +++ b/pom.xml @@ -130,7 +130,6 @@ spring-apache-camel spring-batch spring-boot - spring-boot-kotlin spring-cloud-data-flow spring-cloud spring-core diff --git a/spring-boot-kotlin/pom.xml b/spring-boot-kotlin/pom.xml deleted file mode 100644 index d254531082..0000000000 --- a/spring-boot-kotlin/pom.xml +++ /dev/null @@ -1,151 +0,0 @@ - - - 4.0.0 - - - org.springframework.boot - spring-boot-starter-parent - 2.0.0.BUILD-SNAPSHOT - - - -spring-boot-kotlin -1.0.0-SNAPSHOT - - - true - UTF-8 - UTF-8 - 1.8 - 1.1.2 - - - - - org.springframework.boot - spring-boot-starter-web - - - - org.jetbrains.kotlin - kotlin-stdlib-jre8 - ${kotlin.version} - - - org.jetbrains.kotlin - kotlin-reflect - ${kotlin.version} - - - com.fasterxml.jackson.module - jackson-module-kotlin - 2.8.7 - - - - org.springframework.boot - spring-boot-starter-test - test - - - - - ${project.basedir}/src/main/kotlin - ${project.basedir}/src/test/kotlin - - - org.springframework.boot - spring-boot-maven-plugin - - - kotlin-maven-plugin - org.jetbrains.kotlin - ${kotlin.version} - - - spring - - 1.8 - - - - compile - compile - - compile - - - - test-compile - test-compile - - test-compile - - - - - - org.jetbrains.kotlin - kotlin-maven-allopen - ${kotlin.version} - - - - - org.apache.maven.plugins - maven-surefire-plugin - ${maven-surefire-plugin.version} - - - **/*IntegrationTest.java - **/*LongRunningUnitTest.java - **/*ManualTest.java - **/JdbcTest.java - **/*LiveTest.java - - - - - - - - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - true - - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - - - - - spring-snapshots - Spring Snapshots - https://repo.spring.io/snapshot - - true - - - - spring-milestones - Spring Milestones - https://repo.spring.io/milestone - - false - - - - - \ No newline at end of file diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloController.kt b/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloController.kt deleted file mode 100644 index 69be7dac7e..0000000000 --- a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloController.kt +++ /dev/null @@ -1,23 +0,0 @@ -package com.baeldung.springbootkotlin - -import org.springframework.web.bind.annotation.GetMapping -import org.springframework.web.bind.annotation.RestController - -@RestController -class HelloController(val helloService: HelloService) { - - @GetMapping("/hello") - fun helloKotlin(): String { - return "hello world" - } - - @GetMapping("/hello-service") - fun helloKotlinService(): String { - return helloService.getHello() - } - - @GetMapping("/hello-dto") - fun helloDto(): HelloDto { - return HelloDto("Hello from the dto") - } -} \ No newline at end of file diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloDto.kt b/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloDto.kt deleted file mode 100644 index f61c101f0f..0000000000 --- a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloDto.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.baeldung.springbootkotlin - -data class HelloDto(val greeting: String) diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloService.kt b/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloService.kt deleted file mode 100644 index 67791a0c2d..0000000000 --- a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/HelloService.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.baeldung.springbootkotlin - -import org.springframework.stereotype.Service - -@Service -class HelloService { - - fun getHello(): String { - return "hello service" - } -} \ No newline at end of file diff --git a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/KotlinDemoApplication.kt b/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/KotlinDemoApplication.kt deleted file mode 100644 index dbe5694b6d..0000000000 --- a/spring-boot-kotlin/src/main/kotlin/com/baeldung/springbootkotlin/KotlinDemoApplication.kt +++ /dev/null @@ -1,11 +0,0 @@ -package com.baeldung.springbootkotlin - -import org.springframework.boot.SpringApplication -import org.springframework.boot.autoconfigure.SpringBootApplication - -@SpringBootApplication -class KotlinDemoApplication - -fun main(args: Array) { - SpringApplication.run(KotlinDemoApplication::class.java, *args) -} diff --git a/spring-boot-kotlin/src/main/resource/application.properties b/spring-boot-kotlin/src/main/resource/application.properties deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/spring-boot-kotlin/src/test/kotlin/springbootkotlin/KotlinDemoApplicationIntegrationTest.kt b/spring-boot-kotlin/src/test/kotlin/springbootkotlin/KotlinDemoApplicationIntegrationTest.kt deleted file mode 100644 index fbe83926ef..0000000000 --- a/spring-boot-kotlin/src/test/kotlin/springbootkotlin/KotlinDemoApplicationIntegrationTest.kt +++ /dev/null @@ -1,53 +0,0 @@ -package springbootkotlin - -import com.baeldung.springbootkotlin.HelloDto -import com.baeldung.springbootkotlin.KotlinDemoApplication -import org.junit.Assert.assertEquals -import org.junit.Assert.assertNotNull -import org.junit.Test -import org.junit.runner.RunWith -import org.springframework.beans.factory.annotation.Autowired -import org.springframework.boot.test.context.SpringBootTest -import org.springframework.boot.test.web.client.TestRestTemplate -import org.springframework.http.HttpStatus -import org.springframework.test.context.junit4.SpringRunner - -@RunWith(SpringRunner::class) -@SpringBootTest(classes = arrayOf(KotlinDemoApplication::class), webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) -class KotlinDemoApplicationIntegrationTest { - - @Autowired - val testRestTemplate: TestRestTemplate? = null - - @Test - fun contextLoads() { - } - - @Test - fun testHelloController() { - val result = testRestTemplate?.getForEntity("/hello", String::class.java) - - assertNotNull(result) - assertEquals(result?.statusCode, HttpStatus.OK) - assertEquals(result?.body, "hello world") - } - - @Test - fun testHelloService() { - val result = testRestTemplate?.getForEntity("/hello-service", String::class.java) - - assertNotNull(result) - assertEquals(result?.statusCode, HttpStatus.OK) - assertEquals(result?.body, "hello service") - } - - @Test - fun testHelloDto() { - val result = testRestTemplate?.getForEntity("/hello-dto", HelloDto::class.java) - - assertNotNull(result) - assertEquals(result?.statusCode, HttpStatus.OK) - assertEquals(result?.body, HelloDto("Hello from the dto")) - } - -}