Commit f6834ced authored by Quxl's avatar Quxl

x

parent 2c9528d5
......@@ -34,7 +34,6 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
@Qualifier("log")
private JdbcTemplate jdbcTemplate;
@Async
private void exec(HttpServletRequest req) {
if(isOpen) {
try {
......@@ -48,11 +47,16 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
map.put("sClientIP", remoteIp);
map.put("sParams", params);
map.put("dCreateTime", new Date());
jdbcTemplate.save("tLog", map);
this.save(map);
} catch (Throwable e) {
e.printStackTrace();
}
}
}
@Async
public void save(Map<String, Object> map) {
jdbcTemplate.save("tLog", map);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment