我有一个菜单,我在所有页面中使用。问题是当我在一个包含多个dir示例的页面上时:localhost:8080/user/edit
当我点击转到主页而不是localhost:8080/dashboard
时,我得到localhost:8080/user/dasboard
控制器:
@RequestMapping("dasboard")
public ModelAndView editTestCase(HttpServletRequest request) {
//code
}
@RequestMapping("user/edit")
public ModelAndView editTestCase(HttpServletRequest request) {
//code
}
菜单:
<li class="nav-item" id="dashboard">
<a class="nav-link" href="dashboard">
<img src="../resources/img/icons/dashboard-icon.png" alt="" class="menuIcon">
<span class="menu-title">Dashboard</span>
</a>
</li>