@Test public void sayHello() { jdbcTemplate.update("delete from `log`"); demoService.sayHello(); Map<String, Object> result = jdbcTemplate.queryForMap("select * from `log`"); Assert.assertEquals("demoResource", result.get("resource")); Assert.assertEquals("demoAction", result.get("action")); Assert.assertEquals("sayHello", result.get("methodName")); Assert.assertEquals("com.fenbi.newbull.commonsdblogdemo.DemoService", result.get("classname")); }
@DbLog(resource = "demoResource", action = "demoAction") public void sayHello() { System.out.println("hello foo.\n"); }
DemoService { @DbLog(resource = "demoResource", action = "demoAction") public void sayHello() { System.out.println("hello foo.\n"); } }
DemoService { @DbLog(resource = "demoResource", action = "demoAction") public void sayHello() { System.out.println("hello foo.\n"); }  }
DemoService { @DbLog(resource = "demoResource", action = "demoAction") public void sayHello() { System.out.println("hello foo.\n"); }  @DbLog(resource = "demoResource", action = "demoAction") void sayHello(); }
DemoService { @DbLog(resource = "demoResource", action = "demoAction") public void sayHello() { System.out.println("hello foo.\n"); }  @DbLog(resource = "demoResource", action = "demoAction") void sayHello();  }