概要:ssm项目中跳转servlet、并且注入service对象
新建servlet,重点init方法,注解注入,doGet方法
public void init(ServletConfig config) throws ServletException {
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
配置web.xml文件
概要:ssm项目中跳转servlet、并且注入service对象
新建servlet,重点init方法,注解注入,doGet方法
public void init(ServletConfig config) throws ServletException {
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this, config.getServletContext());
}
配置web.xml文件