<!-- 指定spring的配置文件,默认从web根目录寻找配置文件,我们可以通过spring提供的classpath:前缀指定从类路径下寻找 -->
<context-param>
   <param-name>contextConfigLocation</param-name>
   <param-value>classpath:beans.xml</param-value>
</context-param>
<!-- 对Spring容器进行实例化 -->
<listener>
      <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>beans.xml在src下

解决方案 »

  1.   

    Caused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
    楼主的jdk哪个版本的?看着像jdk版本过低导致的问题
      

  2.   

    我使用的SPRING版本是2.5,查过之后发现者应该是SPRING的一个BUG,可能新版本有修复吧,总而言之就是1.8的JDK太高了,SPRING 支持不了,修改方法也很简单,右键项目--》BUILD PATH--》Config Build Path--》Libraries-->Jre System Library--》Edit--》参考 AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
      

  3.   

    楼主将jdk降低到哪个版本了呢?
    clean一下工程,clean一下tomcat缓存,然后重启试试csdn中还有一个方法,但都是jdk1.8时出错的,楼主的是1.7啊
    给楼主参考下 AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
      

  4.   

    楼主将jdk降低到哪个版本了呢?
    clean一下工程,clean一下tomcat缓存,然后重启试试csdn中还有一个方法,但都是jdk1.8时出错的,楼主的是1.7啊
    给楼主参考下 AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
    我改1.6了
      

  5.   

    IDE重置了jdk版本。
    项目上右键->properties:
    1、Java Build Path->看看JRE System Library的版本多少,修正过来
    2、Java Compiler->看看编译级别多少,修正过来
    3、Project Facets->如果这里没设置就不用管,设置了就检查下Java的version值并修正过来
      

  6.   

    JDK版本低了,错误提示是让你使用JDK1.5或者更高级的
      

  7.   

    给楼主参考下 AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
    这个是完全可以的
      

  8.   

    给楼主参考下AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
    这个是完全可以的