Tag: request parameter

  • How to deal with optional request parameters in Spring Boot?

    Let’s say you are creating a REST API in Spring Boot which accepts request parameters. You use the annotation @RequestParam to retrieve the request values. And if user does not supply the request parameter Spring will throw error. What if the request parameter is just an optional parameter? How to handle this in Spring ?…