手動注入beanjava
public @ResponseBody Map<String,Object> setInfoToUser(HttpServletRequest request,String ids) { WebApplicationContext context = WebApplicationContextUtils .getWebApplicationContext(request.getServletContext()); WeixinController weixinController = (WeixinController) context.getBean("weixinController"); }