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:
- Kotlin SpringJPA Many-To-Many relationship
- Kotlin Spring JPA + Postgresql | Spring Boot Example
- Kotlin SpringJPA Hibernate One-To-Many relationship
- Spring Framework 4.3 New Feature RequestMapping: @GetMapping, @PostMapping, @PutMapping, @DeleteMapping
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:
Kotlin Spring MVC RequestMapping RESTful APIs with @GetMapping, @PostMapping, @PutMapping, @DeleteMapping | SpringBoot Example
Top comments (0)