因为容器尚未初始化,所以获取一些BEAN的方式也会特殊一些
WebApplicationContext ctx = RequestContextUtils.findWebApplicationContext(request);
assert ctx != null;
ApiLogService apiLogService = (ApiLogService) ctx.getBean("apiLogServiceImpl");
因为容器尚未初始化,所以获取一些BEAN的方式也会特殊一些
WebApplicationContext ctx = RequestContextUtils.findWebApplicationContext(request);
assert ctx != null;
ApiLogService apiLogService = (ApiLogService) ctx.getBean("apiLogServiceImpl");