Commit f6834ced authored by Quxl's avatar Quxl

x

parent 2c9528d5
...@@ -34,7 +34,6 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -34,7 +34,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 {
...@@ -48,11 +47,16 @@ public class LogInterceptor extends HandlerInterceptorAdapter { ...@@ -48,11 +47,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