摘要: 在Servlet中使用注解的方式引用Spring bean对象,会报空指针,因此可以在init()方法中通过WebApplicationContextUtils.getWebApplicationContext(servletContext)获取Spring, 代码如下: 阅读全文
posted @ 2016-06-03 18:17 ycblus 阅读(2530) 评论(0) 推荐(0) 编辑