(Method m, Object obj, Object... args)
| 28 | } |
| 29 | |
| 30 | void invoke(Method m, Object obj, Object... args) throws Exception { |
| 31 | if(m.getAnnotation(Transactional.class)!=null) |
| 32 | System.out.println("[before]{"); |
| 33 | |
| 34 | m.invoke(obj, args); // aaa(), aaa2(), bbb() 호출가능 |
| 35 | |
| 36 | if(m.getAnnotation(Transactional.class)!=null) |
| 37 | System.out.println("}[after]"); |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | class MyClass { |