https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller
Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController
In the tutorial, JavaSampleApproach will show you the first step to build a SpringBoot Kotlin RESTful Web Service.
Related posts:
@RestController
annotation:
[...]
@RestController
class KotlinRestController {
...
}
For use it, we need a spring-boot-starter-web
dependency.
By default, SpringBoot starts an embedded Tomcat container at port: 8080. We can use server.port
in application.properties to change the default.
Step to do:
Then add needed dependency:
More at:
https://grokonez.com/kotlin/kotlin-build-springboot-kotlin-restful-web-service-restcontroller
Kotlin – How to build a SpringBoot Kotlin RESTful Web Service with @RestController
#kotlin #springboot #restcontroller #restful