报错信息
Caused by: java.lang.IllegalStateException: AnnotationTransactionAttributeSource is only available on Java 1.5 and higher
at org.springframework.transaction.config.TxNamespaceUtils.getAnnotationTransactionAttributeSourceClass(TxNamespaceUtils.java:43)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser$AopAutoProxyConfigurer.configureAutoProxyCreator(AnnotationDrivenBeanDefinitionParser.java:115)
at org.springframework.transaction.config.AnnotationDrivenBeanDefinitionParser.parse(AnnotationDrivenBeanDefinitionParser.java:80)
at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:69)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1297)
at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1287)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:135)
at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:92)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:507)
at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:398)
... 58 more
解决办法:启动项目时,将jdk1.8版本 降到jdk1.7
同时设置compile选项,要不然启动会报错Error:java: System Java Compiler was not found in classpath: java.lang.ClassNotFoundException
原因: IDEA 会记住之前用的jdk 目录,当你使用的上一个版本的jdk 卸载删除之后,idea还是有记录存在,会去找上个版本的javac 地址。修改之后可以正常启动项目