Add missing Spring Controller templates for Kotlin and Scala

Fixes: #5817
This commit is contained in:
Georgios Andrianakis
2019-12-06 14:21:41 +02:00
parent f526e8c473
commit a29f77f856
2 changed files with 27 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
package ${package_name};
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.PathVariable;
@RestController
@RequestMapping("${path}")
class ${class_name} {
@GetMapping
fun hello() = "hello"
}

View File

@@ -0,0 +1,12 @@
package ${package_name};
import org.springframework.web.bind.annotation.{GetMapping, RequestMapping, RestController, PathVariable};
@RestController
@RequestMapping(Array[String]("${path}"))
class ${class_name} {
@GetMapping
def hello() = "hello"
}