Guest User

Untitled

a guest
Jan 19th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. @GetMapping("/path/{searchTerm}")
  2. public String request1(@PathVariable(value = "searchTerm") String searchTerm, Model model) {
  3. List<Result> results = searchService.getResults(searchTerm);
  4. model.addAttribute("reports", results);
  5. return "searchresults";
  6. }
  7.  
  8. @GetMapping("/path")
  9. public String request2(@RequestParam(value="searchTerm", required = false) String searchTerm, Model model) {
  10. List<Result> results = searchService.getResults(searchTerm);
  11. model.addAttribute("reports", results);
  12. return "searchresults";
  13. }
Add Comment
Please, Sign In to add comment