ServletContext context = request.getServletContext(); ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(context); DbUtilTpl dbUtilTpl = ctx.getBean(DbUtilTpl.class);