@JFinal 你好,想跟你请教个问题:
JFinal 配置druid 的时候访问
public void configPlugin(Plugins me) {
DruidPlugin datasource = new DruidPlugin(DB_URL, DB_USERNAME, DB_PASSWORD);//数据库连接插件
datasource.addFilter(new StatFilter());
WallFilter wall = new WallFilter();
wall.setDbType("mysql");
datasource.addFilter(wall);
me.add(datasource);
}
public void configHandler(Handlers me) {
DruidStatViewHandler dvh = new DruidStatViewHandler("/druid");
me.add(dvh);
}
localhost/druid/index.html报错
type Exception report
message Filter execution threw an exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Filter execution threw an exception
root cause
java.lang.IllegalAccessError: tried to access method com.alibaba.druid.support.http.StatViewServlet.returnResourceFile(Ljava/lang/String;Ljava/lang/String;Ljavax/servlet/http/HttpServletResponse;)V from class com.jfinal.plugin.druid.DruidStatViewHandler$JFinalStatViewServlet com.jfinal.plugin.druid.DruidStatViewHandler$JFinalStatViewServlet.service(DruidStatViewHandler.java:163) com.jfinal.plugin.druid.DruidStatViewHandler.handle(DruidStatViewHandler.java:69) com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
note The full stack trace of the root cause is available in the Apache Tomcat/8.0.28 logs.
去掉web.xml中对druidfilter的配置我把druid的版本升级之后可以了。还是很感谢
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。