Methodmethod=applicationContext.getClass().getMethod("addApplicationListener",newClass<?>[]{ApplicationListener.class});// backward compatibility to spring 2.0.1
Methodmethod=AbstractApplicationContext.class.getDeclaredMethod("addListener",newClass<?>[]{ApplicationListener.class});// compatible with Spring2.0.1
Methodmethod=AbstractApplicationContext.class.getDeclaredMethod("addListener",newClass<?>[]{ApplicationListener.class});// backward compatibility to spring 2.0.1