@GetMapping({"/get-all-posts"}) public PostResponse getAllPosts(@RequestParam(value = "pageNo", defaultValue=AppConstants.DEFAULT_PAGE_NUMBER, required = false) Integer pageNo, @RequestParam(value = "pageSize", defaultValue = AppConstants.DEFAULT_PAGE_SIZE, required = false) Integer pageSize ) { return postsService.getAllPosts(pageNo, pageSize); }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter