简单控制器未按预期工作

时间:2018-02-15 11:56:56

标签: java html spring

我有一个菜单,我在所有页面中使用。问题是当我在一个包含多个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>

0 个答案:

没有答案