Commit 96ecd0a4 authored by Quxl's avatar Quxl

x

parent b1c1e702
...@@ -37,7 +37,6 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -37,7 +37,6 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
@Qualifier("log") @Qualifier("log")
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@Async
private void exec(HttpServletRequest req) { private void exec(HttpServletRequest req) {
if(isOpen) { if(isOpen) {
try { try {
...@@ -51,11 +50,16 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -51,11 +50,16 @@ public class LogInterceptor extends HandlerInterceptorAdapter {
map.put("sClientIP", remoteIp); map.put("sClientIP", remoteIp);
map.put("sParams", params); map.put("sParams", params);
map.put("dCreateTime", new Date()); map.put("dCreateTime", new Date());
jdbcTemplate.save("tLog", map); this.save(map);
} catch (Throwable e) { } catch (Throwable e) {
e.printStackTrace(); 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