skip to Main Content

Java Spring Boot how to set Redis cache key for multiple query string parameters on controller

With the following Controller method: @GetMapping("/books") public ResponseEntity<List<Book>> getBooksByTitleOrAuthor( @RequestParam(required = false) String title, @RequestParam(required = false) String author) { if ((title== null || title.isEmpty()) && (author == null || author.isEmpty())) return new ResponseEntity<>(HttpStatus.BAD_REQUEST); if (author != null) { Logger.info("GET…

VIEW QUESTION
Back To Top
Search