Servlet中调用ssm的service层的方法

来源:互联网 发布:金融大数据平台架构 编辑:程序博客网 时间:2024/05/16 11:36
重写inti方法
public void init(ServletConfig config) throws ServletException {
// Put your code here
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}

在用spring管理service的系统中需要
@Autowired
private BusinessOrderService businessorderService ;
添加注释。这样才能够正常的调用service层。
原创粉丝点击