/**
*然后在servlet里面得到spring注入的service
* 强制获得spring注入的service。不能直接new。需要强制得到。
*/
ApplicationContext applicationContext = WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
TestService testService = (TestService) applicationContext.getBean("testService");
//企图直接new或者让spring按正常方法装配都会在调用getHibernateTemplate等方法时出现nullpointer错误
//done