First, the problem description and the reason.
in the SPRING2.5AOP example, there will be an error only if available on JDK 1.5 and higher, which probably means JDK1.5 or higher. But I use the JDK1.8 is higher than 1.5, but why the error? Refer to this link through the information: http://fanli7.net/a/JAVAbiancheng/Spring/20140321/481981.html. The above said that the source code is org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser automatic detection, JDK version detection needs to jre1.5 above version, but Jdkversio n does not match any JDK until 1.7,jre1.8 is checked.
second, the solution.
1. Reduce the JDK version to 1.7
2, change Spring2.5 in the Org.springframework.context.annotation.AnnotationConfigBeanDefinitionParser code to add public static final int java_18 = 5;
Third, summary.
no matter how good the framework will have such a bug exists, when we develop it is best to choose a more stable version of a relatively new to develop, so as to avoid some unnecessary trouble.
Getting Started with Java-mastering the wrong Spring2.5 using the AOP times error only available on JDK 1.5 and higher