1.前言.
如题.
2.代码.
感谢帅6子517 的文章:
http://zhidao.baidu.com/link?url=lFiT56hR8vTPr61OgoaYNTOcXQoGNanjMMfBnlZN_foaA8ePsijqx68mjWWUtPkjfR-rJw0dsuXLhFD8yv1oF6Ov9auc8zwqXuOx-xrh0he
如题.
2.代码.
注入方法::在Servlet的init方法中增加以下代码:
public void init(ServletConfig config) throws ServletException {
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
config.getServletContext());
}
感谢帅6子517 的文章:
http://zhidao.baidu.com/link?url=lFiT56hR8vTPr61OgoaYNTOcXQoGNanjMMfBnlZN_foaA8ePsijqx68mjWWUtPkjfR-rJw0dsuXLhFD8yv1oF6Ov9auc8zwqXuOx-xrh0he