Skip to content

Commit

Permalink
fix SPAController
Browse files Browse the repository at this point in the history
  • Loading branch information
mucsi96 committed Aug 26, 2024
1 parent 9161100 commit 06baf1f
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,9 @@
@RequestMapping(produces = MediaType.TEXT_HTML_VALUE)
public class SPAController {

@GetMapping({ "/{segment1:[^.]*}", "/{segment1:.+}/{segment2:[^.]*}" })
@GetMapping({ "/", "/{segment1:[^.]*}", "/{segment1:.+}/{segment2:[^.]*}" })
public String index(HttpServletRequest request, Model model) {
String contextPath = request.getContextPath();
model.addAttribute("baseHref", contextPath + "/");
model.addAttribute("baseHref", request.getContextPath() + "/");
return "index";
}
}

0 comments on commit 06baf1f

Please sign in to comment.