JFinal 做为商业项目应用,配置Druid出现如下问题,求助:
DruidStatViewHandler dvh = new DruidStatViewHandler("/admin/monitor", new IDruidStatViewAuth() {
public boolean isPermitted(HttpServletRequest request) {
HttpSession hs = request.getSession(false);
// return (hs != null && hs.getAttribute("admin") != null);
return true;
}
});
handlers.add(dvh);
访问:“http://127.0.0.1:8080/druid/”会自动跳转:“http://127.0.0.1:8080/druid/index.html”;但页面一直显示:Not Found,
求助啊,,急!!!感谢各位大神!
项目:JFinal
改成
new DruidStatViewHandler("/druid", ...)
否则访问的 url 改成 http://localhost:8080/admin/monitor
也就是说,配置要与访问的 url 保持一致,否则必须要显示 404