ApplicationContextUtil { public static Map<String, Object> getApplicationContextInfoMapForLog(ApplicationContext applicationContext){ return getApplicationContextInfoMapForLog(applicationContext, true); } private  ApplicationContextUtil(); static Map<String, Object> getApplicationContextInfoMapForLog(ApplicationContext applicationContext); static Map<String, Object> getApplicationContextInfoMapForLog(ApplicationContext applicationContext,boolean loadParent); static Map<String, T> getBeanNameAndBeanMap(ApplicationContext applicationContext,Class<T> klass);  }
@Test public void test(){ Map<String, Object> applicationContextForLogMap = ApplicationContextUtil.getApplicationContextInfoMapForLog(applicationContext); LOGGER.debug("ApplicationContextForLogMap:{}", JsonUtil.format(applicationContextForLogMap)); LOGGER.debug("" + applicationContext.containsBean("feitian@")); }