将Web工程部署到Linux服务器上时,spring报错:
![](https://img-my.csdn.net/uploads/201304/07/1365303416_1670.png)
![](https://img-my.csdn.net/uploads/201304/07/1365303532_1119.png)
![](https://img-my.csdn.net/uploads/201304/07/1365303562_9958.jpg)
Error creating bean with name 'org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping#0' defined in ServletContext resource [/WEB-INF/xxx-servlet.xml]: Initialization of bean failed.
不能加载spring配置文件中默认扫描包中的类:
<!-- 默认扫描的包路径 -->
<context:component-scan base-package="cn.ac.dsp.controller"/>
报错如下:
工程-->Properties
![](https://img-my.csdn.net/uploads/201304/07/1365303416_1670.png)
Compiler compliace level更改为1.5
![](https://img-my.csdn.net/uploads/201304/07/1365303532_1119.png)
然后Installed JRE
![](https://img-my.csdn.net/uploads/201304/07/1365303562_9958.jpg)