摘要: 注解在接口中的方法,子类中不能查找到方法的注解public class AnnotationTest implements A {public static void main(String[] args) {Method[] ms = A.class.getDeclaredMethods();System.out.println(ms[1].getName()+" : "+ms[1].isAnnotationPresent(Annotation.class));}public void a() {}public void b() {}}interface A{void a 阅读全文
posted @ 2013-08-26 18:14 prison 阅读(214) 评论(0) 推荐(0) 编辑
摘要: interface IIA{ void getAge();}class CallBackDemo implements IIA{ public void getAge() { System.out.println("3"); } public void dosome(){ B b = new B(); System.out.println("4"); b.doSomething(this); System.out.println("5"); } public static void main(String[] args) { new 阅读全文
posted @ 2013-08-26 13:37 prison 阅读(188) 评论(0) 推荐(0) 编辑
摘要: web.xml: webAppRootKey webApp.rootlog4jConfigLocation classpath:log4j.properties org.springframework.web.util.Log4jConfigListener...log4j.properties:log4j.appender.logfile.File=${webApp.root}/WEB-INF/logs/app.log 阅读全文
posted @ 2013-08-26 10:47 prison 阅读(491) 评论(0) 推荐(0) 编辑