1、html代码
<a href="/ps-admin-nimitz/knowledge-mining/brandDictManage.html" style="color: #869fb1;margin-left: 39px;">
品牌词管理
</a>
2、java代码
public class BrandDictManage {
@RequestMapping("/knowledge-mining/brandDictManage.html")
public String brandDictManageWeb(ModelMap modelMap, HttpServletRequest request, @RequestParam(required = false) String keyword,
@RequestParam(required = false) String page) {
.........................................
}
}
点击上面的超链接无法跳转到BrandDictManage中是因为忘记在BrandDictManage类名前面加@Controller了。
正确的代码应该是:
@Controller
public class BrandDictManage {
@RequestMapping("/knowledge-mining/brandDictManage.html")
public String brandDictManageWeb(ModelMap modelMap, HttpServletRequest request, @RequestParam(required = false) String keyword,
@RequestParam(required = false) String page) {
.........................................
}
}