Use @RequestParam to get URL parameters in Spring Boot

preview_player
Показать описание
Need to get a value from a URL name:value pair in Spring Boot? Use @RequestParam! We take a simple look at @RequestParam, then expand it to look at how to provide a default value if no value is specified.
Рекомендации по теме
Комментарии
Автор

I tried it..it worked for me as well. But there is an issue, these values are not getting updated in database. Can you tell some solution.

aishwaryashinde
Автор

GET ->
if u send only one parameter, how can i validate this and return a custom response if don't using a Model/DTO ???
Thanks!

CesarLMorales
Автор

Good tutorial, but I think the use of "addspecimen" was unfortunate, in that I would associate that with a POST operation (i.e., you are actually *retrieving* data here, and then modifying the value for display once it's been retrieved, but you aren;t really *adding* anything in the CRUD sense). I think something along the lines of "displayspecimen" would have been better to avoid confusion.

almiller
join shbcf.ru