沉默的背影 X-Pacific

keep learning

spring aop切面中获取代理bean的名字以及bean

//切面中搞:
Map<String , Object> map = (Map)ApplicationContextHelper.getBean(proceedingJoinPoint.getTarget().getClass());
        ExcelDistributedReadIntf intf = null;
        String beanid = "";
        for (String key : map.keySet()) {
            beanid = key;
            intf = (ExcelDistributedReadIntf)map.get(key);
        }

 

posted @ 2018-07-26 14:39  乂墨EMO  阅读(3195)  评论(0编辑  收藏  举报