2021-04-27 15:42

@杜福忠
public class MyHandle extends Handler{
private static Logger log = LoggerFactory
.getLogger(GlobalInterceptor.class);

@Override
public void handle(String s, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, boolean[] booleans) {
String allRequestParams = HttpUtil.getAllRequestParams(httpServletRequest);
log.info("传的参数123:" + allRequestParams);
}
}

2021-04-27 15:42

@杜福忠 heHandlers.add(new ContextPathHandler("base"));
heHandlers.add(new UrlSkipHandler("/monitoring", false));
heHandlers.add(new MyHandle());
这样写,他是不是什么都拦截了,页面显示404.主要是加了第三个handle

2021-03-29 20:59

@zzutligang 好的,谢谢,手动调一下renderJson就好了

2021-03-29 18:24

怎么让她不报错,又能正确返回boolean值?拦截器模板现在不改了?

2021-02-19 15:20

@zzutligang
//检测表是否存在
String selectDbName = "select database() as dbName";
Map DbNameMap = JdbcUtil.queryForOneMap(logConn,selectDbName,"testSql");
Object dbName = DbNameMap.get("dbName");
String sql = "select table_name from Information_schema.tables where table_Name = 'logs_" + index + "'" + "and TABLE_SCHEMA='"+ dbName.toString() +"'";
Map tableName = JdbcUtil.queryForOneMap(logConn,sql,"testSql");
if (tableName == null){
iterator.remove();
}

已经解决了,谢谢

2021-02-05 21:03

@JFinal 我这里的Connection是不一样的。用Db好像跑不通?

2021-02-05 20:58

我这里的数据库是多个的。有没有一种指定Connection的判断方法?