@Override
    public Object[] getBeanDatas(Class<?> clazz) {
        WebApplicationContext wac = ContextLoader.getCurrentWebApplicationContext();
        
        String[] bdns = wac.getBeanDefinitionNames();
        Map<String,Object> tempBeanMap = new HashMap<String,Object>();
        for(String bdn : bdns){
            try{
                Object bean = wac.getBean(bdn);
                if(clazz.equals(bean.getClass())){
                    tempBeanMap.put(bdn, bean);
                }else if(AopUtils.isAopProxy(bean)){
                    Object target = getTarget(bean);
                    if(target.getClass().equals(clazz)){
                        tempBeanMap.put(bdn,target);
                        tempBeanMap.put(bdn + "_proxy",bean);
                    }
                }
            }catch(Exception ignore){
                //There are abstract classes when getBean will throw exception, so we ignore them.
            }
        }
        beanMap.putAll(tempBeanMap);
        
        return tempBeanMap.keySet().toArray();
    }