Commit 96ecd0a4 authored by Quxl's avatar Quxl

x

parent b1c1e702
......@@ -37,7 +37,6 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
@Qualifier("log")
private JdbcTemplate jdbcTemplate;
@Async
private void exec(HttpServletRequest req) {
if(isOpen) {
try {
......@@ -51,11 +50,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