集成了druid之后,配置了Druid的监控。但是登录的时候提示404 Action Not Found: /druid/submitLogin。我看Jfinal 对StatViewServlet进行了封装。该怎么配置才能正常访问呢?
<> <>DruidStatView</> <>com.alibaba.druid.support.http.StatViewServlet</> <> <>resetEnable</> <>true</> </> <> <>loginUsername</> <>mapedu</> </> <> <>loginPassword</> <>mapedu20200610</> </> </> <> <>DruidStatView</> <>/druid/*</> </>
这是我目前的配置。求助
项目:JFinal
public void configHandler(Handlers me) {
me.add(DruidKit.getDruidStatViewHandler()); // druid 统计页面功能
}
public static DruidStatViewHandler getDruidStatViewHandler() {
return new DruidStatViewHandler("/assets/druid", new IDruidStatViewAuth() {
public boolean isPermitted(HttpServletRequest request) {
String sessionId = getCookie(request, LoginService.sessionIdName);
if (sessionId != null) {
Account loginAccount = loginSrv.getLoginAccountWithSessionId(sessionId);
return AuthCacheClearInterceptor.isAdmin(loginAccount);
}
return false;
}
});
}
访问地址:
localhost/assets/druid
按照上面的办法基本照抄就可以