org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'supplierAction': Injection of resource dependencies failed; nested exception is org.springframework.beans.factor

这个错误是因为抽象Action类的时候,把ServletContext写成了serverContext,导致无法注入,正确写法是

import javax.annotation.Resource;
import javax.servlet.ServletContext;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping; @Controller
@RequestMapping("/base")
public class BaseAction { @Resource
ServletContext servletContext;
}
上一篇:loadrunner回放脚本报错27780:“[10053] 软件导致连接中止”


下一篇:P3714 [BJOI2017]树的难题 点分治+线段树合并