报错:Context namespace element 'component-scan' and its parser class [org.springframework.context.annotation.ComponentScanBeanDefinitionParser] are only available on JDK 1.5 and higher
把这两个依赖加入即可。上面那个springframework支持JDK8。下面那个logging也必须,否则日志有报错。我用的阿里的Maven仓库。
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6.SEC03-atlassian-2</version>
</dependency>
<dependency>
<groupId>com.innoventsolutions.birt.runtime</groupId>
<artifactId>org.apache.commons.logging_1.1.1.v201101211721</artifactId>
<version>4.8.0</version>
</dependency>