Error creating bean with name 'userLogger' defined in class path resource [applicationContext-core.xml]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [dersp.core.utils.UserLogger]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems:
The import javax.servlet.http.HttpServletRequest cannot be resolved
HttpServletRequest cannot be resolved to a type
The method getRequest() from the type ServletActionContext refers to the missing type HttpServletRequest
解决方法:
在找到项目源文件的/WebRoot/WEB-INF/lib下增加一个servlet-api的札包,到eclipse中refresh整个项目,然后右击项目名,选择buildpath->config build path ->add jars
servlet-api札包下载地址:http://download.csdn.net/detail/tongyuehong/6416979