donderdag 9 januari 2025

Spring-boot GetMapping and PostMapping parameters

What kind of parameters are possible on a GetMapping and PostMapping annotated method in Spring-Boot?

@GetMapping("/group/{groupid}/removeuser/{userid}")
suspend fun removeGroupUserById(@PathVariable groupid: Long, @PathVariable userid: Long) : ResponseEntity<Any> { code.. }

There are the following possibilities:
@PathVariable groupid: Long
@RequestParam name: String?
request: HttpServletRequest
@RequestBody group: GroupDTO


Geen opmerkingen:

Een reactie posten