model modelmap code example
Example: modelmap in spring mvc
@GetMapping("/showViewPage")public String passParametersWithModel(Model model) { Map<String, String> map = new HashMap<>(); map.put("spring", "mvc"); model.addAttribute("message", "Baeldung"); model.mergeAttributes(map); return "viewPage";}