Source:
private void registerBuiltInBeans(ParserContext parserContext) { String jsonPathBeanName = "jsonPath"; boolean alreadyRegistered = false; if (parserContext.getRegistry() instanceof ListableBeanFactory) { alreadyRegistered = ((ListableBeanFactory) parserContext.getRegistry()).containsBean(jsonPathBeanName); } else { alreadyRegistered = parserContext.getRegistry().isBeanNameInUse(jsonPathBeanName); } if (!alreadyRegistered) { Class<?> jsonPathClass = null; try { jsonPathClass = ClassUtils.forName("com.jayway.jsonpath.JsonPath", parserContext.getReaderContext().getBeanClassLoader()); } catch (ClassNotFoundException e) { logger.debug("SpEL function '#jsonPath' isn't registered: there is no jayway json-path.jar on the classpath."); } if (jsonPathClass != null) { IntegrationNamespaceUtils.registerSpelFunctionBean(parserContext.getRegistry(), jsonPathBeanName, IntegrationNamespaceUtils.BASE_PACKAGE + ".json.JsonPathUtils", "evaluate"); } } String xpathBeanName = "xpath"; alreadyRegistered = false; if (parserContext.getRegistry() instanceof ListableBeanFactory) { alreadyRegistered = ((ListableBeanFactory) parserContext.getRegistry()).containsBean(xpathBeanName); } else { alreadyRegistered = parserContext.getRegistry().isBeanNameInUse(xpathBeanName); } if (!alreadyRegistered) { Class<?> jsonPathClass = null; try { jsonPathClass = ClassUtils.forName(IntegrationNamespaceUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", parserContext.getReaderContext().getBeanClassLoader()); } catch (ClassNotFoundException e) { logger.debug("SpEL function '#xpath' isn't registered: there is no spring-integration-xml.jar on the classpath."); } if (jsonPathClass != null) { IntegrationNamespaceUtils.registerSpelFunctionBean(parserContext.getRegistry(), xpathBeanName, IntegrationNamespaceUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", "evaluate"); } } this.doRegisterBuiltInBeans(parserContext); }

Target:
private void registerBuiltInBeans(ParserContext parserContext) { String jsonPathBeanName = "jsonPath"; boolean alreadyRegistered = false; if (parserContext.getRegistry() instanceof ListableBeanFactory) { alreadyRegistered = ((ListableBeanFactory) parserContext.getRegistry()).containsBean(jsonPathBeanName); } else { alreadyRegistered = parserContext.getRegistry().isBeanNameInUse(jsonPathBeanName); } if (!alreadyRegistered) { Class<?> jsonPathClass = null; try { jsonPathClass = ClassUtils.forName("com.jayway.jsonpath.JsonPath", parserContext.getReaderContext().getBeanClassLoader()); } catch (ClassNotFoundException e) { logger.debug("SpEL function '#jsonPath' isn't registered: there is no jayway json-path.jar on the classpath."); } if (jsonPathClass != null) { IntegrationNamespaceUtils.registerSpelFunctionBean(parserContext.getRegistry(), jsonPathBeanName, IntegrationNamespaceUtils.BASE_PACKAGE + ".json.JsonPathUtils", "evaluate"); } } String xpathBeanName = "xpath"; alreadyRegistered = false; if (parserContext.getRegistry() instanceof ListableBeanFactory) { alreadyRegistered = ((ListableBeanFactory) parserContext.getRegistry()).containsBean(xpathBeanName); } else { alreadyRegistered = parserContext.getRegistry().isBeanNameInUse(xpathBeanName); } if (!alreadyRegistered) { Class<?> xathClass = null; try { xathClass = ClassUtils.forName(IntegrationNamespaceUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", parserContext.getReaderContext().getBeanClassLoader()); } catch (ClassNotFoundException e) { logger.debug("SpEL function '#xpath' isn't registered: there is no spring-integration-xml.jar on the classpath."); } if (xathClass != null) { IntegrationNamespaceUtils.registerSpelFunctionBean(parserContext.getRegistry(), xpathBeanName, IntegrationNamespaceUtils.BASE_PACKAGE + ".xml.xpath.XPathUtils", "evaluate"); } } this.doRegisterBuiltInBeans(parserContext); }