spring在启动时会在主程序中注入bean,但是线程类是不会注入的,只能通过getbean获取
private static WxUserService wxUserService;
private static ApplicationContext ctx = null;
static{
ctx = ContextLoaderListener.getCurrentWebApplicationContext();
wxUserService = (WxUserService) ctx.getBean("wxUserService");
}