@Override
    public ExecuteContext before(ExecuteContext context) {
        ClassPathBeanDefinitionScanner scanner = (ClassPathBeanDefinitionScanner) context.getObject();
        SpringBeansDealConfig config = PluginConfigManager.getPluginConfig(SpringBeansDealConfig.class);
        String componentBeanNames = config.getExcludeBeans();
        if (!StringUtils.isEmpty(componentBeanNames)) {
            String[] componentBean = componentBeanNames.split(",");
            for (String className : componentBean) {
                try {
                    Class<?> clazz = Class.forName(className);
                    scanner.addExcludeFilter(new AssignableTypeFilter(clazz));
                    LOGGER.info(String.format(Locale.ENGLISH, "ComponentScanInterceptor find class: [%s]", className));
                } catch (ClassNotFoundException e) {
                    LOGGER.warning("ComponentScanInterceptor can not find class: " + className);
                }
            }
        }
        return context;
    }
@Test
    public void testBefore() {
        BEANS_DEAL_CONFIG.setEnabled(true);
        BEANS_DEAL_CONFIG.setExcludeBeans(
                "io.sermant.spring.beans.deal.interceptors.SpringComponentBeanInterceptorTest");
        SpringComponentBeanInterceptor interceptior = new SpringComponentBeanInterceptor();
        ExecuteContext afterExecute = interceptior.before(executeContext);
        ClassPathBeanDefinitionScanner scanner = (ClassPathBeanDefinitionScanner) afterExecute.getObject();
        List<TypeFilter> result = (List<TypeFilter>) ReflectUtils.getFieldValue(scanner, "excludeFilters")
                .get();
        Assert.assertEquals(1, result.size());
    }