Spring Boot - Request and Response Handling
Consider this controller method:
What is the output of accessing
@GetMapping("/search/{type}")
public String search(@PathVariable String type, @RequestParam(required = false) String keyword) {
if (keyword == null) return "Search all " + type;
else return "Search " + type + " for " + keyword;
}What is the output of accessing
/search/book without query parameters?