DEV Community

loading...

Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example

loizenai
Software Engineer - Founder at https://loizenai.com
・2 min read

https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example

Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example

In the tutorial, JavaSampleApproach shows you how to create Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping using SpringBoot.

Related posts:

I. Technologies

– Java 1.8
– Maven 3.3.9
– Spring Tool Suite – Version 3.8.1.RELEASE
– Spring Boot: 1.5.6.RELEASE
– Kotlin 1.1.4

  • PostMan - Rest Client

    II. @GetMapping, @PostMapping, @PutMapping, @DeleteMapping

  • @ org.springframework.web.bind.annotation.GetMapping @GetMapping acts as a shortcut for @RequestMapping(method = RequestMethod.GET).

@GetMapping("/")
fun getAll(): MutableMap{
    ...
}
  • @ org.springframework.web.bind.annotation.PostMapping @PostMapping acts as a shortcut for @RequestMapping(method = RequestMethod.POST).

More at:

https://grokonez.com/spring-framework/kotlin-spring-mvc-requestmapping-restful-apis-getmapping-postmapping-putmapping-deletemapping-springboot-example

Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example

Discussion (0)