Set explicit SOAP fault validator implementation by bean name.
@param validatorName
@param applicationContext
@return
764414
public AssertSoapFaultBuilder validator(String validatorName, ApplicationContext applicationContext) {
        action.setValidator(applicationContext.getBean(validatorName, SoapFaultValidator.class));
        return this;
    }
1233486
private SAXParserFactory newSAXParserFactory( ValidationSet pValidationSet )
    {
        SAXParserFactory spf = SAXParserFactory.newInstance();
        spf.setValidating( pValidationSet.isValidating() );
        if ( pValidationSet.isValidating() )
        {
            try
            {
                spf.setFeature( "http://apache.org/xml/features/validation/schema", true );
            }
            catch ( SAXException e )
            {
                // Ignore this
            }
            catch ( ParserConfigurationException e )
            {
                // Ignore this
            }
        }
        else
        {
            try
            {
                spf.setFeature( "http://apache.org/xml/features/nonvalidating/load-external-dtd", false );
            }
            catch ( SAXException e )
            {
                // Ignore this
            }
            catch ( ParserConfigurationException e )
            {
                // Ignore this
            }
        }
        spf.setNamespaceAware( true );
        return spf;
    }
544846
private void validateAndSetClassLevelWebServiceRef(WebServiceRef webServiceRef, Class<?> instanceClass, WebServiceRefInfo wsrInfo) throws InjectionException {
        // Save off these annotation attributes for use later.
        Class<?> typeClass = webServiceRef.type();
        Class<?> valueClass = webServiceRef.value();

        // If the @WebServiceRef's lookup is specified, then no other attributes should be present. Only name can be specified with lookup.
        if (webServiceRef.lookup() != null && !webServiceRef.lookup().isEmpty()) {
            if (!typeClass.getName().equals(Object.class.getName())
                || !valueClass.getName().equals(Service.class.getName())
                || !webServiceRef.wsdlLocation().isEmpty()
                || !webServiceRef.mappedName().isEmpty()) {

                Tr.error(tc, "error.service.ref.annotation.lookup.redundant.attributes");
                throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.annotation.lookup.redundant.attributes"));
            }

        } else { // Otherwise, no 'lookup' attribute is present, then do our normal validations.

            if (webServiceRef.name().isEmpty()) {
                //For class level WebServiceRef, the 'name' and 'type' must be specified.
                Tr.error(tc, "error.service.ref.class.level.annotation.name.or.type.absent",
                         instanceClass.getName());
                throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.class.level.annotation.name.or.type.absent",
                                                              instanceClass.getName()));

            }

            if (typeClass.getName().equals(Object.class.getName())) { // type is not specified, so try service type injection
                // in this case the 'value' attribute MUST specify a subclass of javax.xml.ws.Service
                if (!Service.class.isAssignableFrom(valueClass) || valueClass.getName().equals(Service.class.getName())) {
                    Tr.error(tc, "error.service.ref.class.level.annotation.name.or.type.absent",
                             instanceClass.getName());
                    throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.class.level.annotation.name.or.type.absent",
                                                                  instanceClass.getName()));
                }

                wsrInfo.setServiceInterfaceClassName(valueClass.getName());
                wsrInfo.setServiceRefTypeClassName(valueClass.getName());

            } else if (Service.class.isAssignableFrom(typeClass)) { // service type injection case
                if (typeClass.getName().equals(Service.class.getName())) { // typeClass is javax.xml.ws.Service
                    // in this case the 'value' attribute MUST specify a subclass of javax.xml.ws.Service
                    if (!Service.class.isAssignableFrom(valueClass) || valueClass.getName().equals(Service.class.getName())) {
                        Tr.error(tc, "error.service.ref.class.level.annotation.wrong.value",
                                 instanceClass.getName(), valueClass.getName());
                        throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.class.level.annotation.wrong.value",
                                                                      instanceClass.getName(), valueClass.getName()));
                    }

                    wsrInfo.setServiceInterfaceClassName(valueClass.getName());
                    wsrInfo.setServiceRefTypeClassName(valueClass.getName());

                } else { //typeClass is a subclass of javax.xml.ws.Service
                    // in this case the 'value' attribute MUST be the same as 'type' or use default javax.xml.ws.Service
                    if (!valueClass.getName().equals(typeClass.getName()) && !valueClass.getName().equals(Service.class.getName())) {
                        Tr.error(tc, "error.service.ref.class.level.annotation.value.and.type.not.same",
                                 instanceClass.getName());
                        throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.class.level.annotation.value.and.type.not.same",
                                                                      instanceClass.getName()));
                    }

                    wsrInfo.setServiceInterfaceClassName(typeClass.getName());
                    wsrInfo.setServiceRefTypeClassName(typeClass.getName());
                }

            } else { // port type injection case
                // in this case the 'value' attribute MUST specify a subclass of javax.xml.ws.Service
                if (!Service.class.isAssignableFrom(valueClass) || valueClass.getName().equals(Service.class.getName())) {
                    Tr.error(tc, "error.service.ref.class.level.annotation.wrong.value",
                             instanceClass.getName(), valueClass.getName());
                    throw new InjectionException(Tr.formatMessage(tc, "error.service.ref.class.level.annotation.wrong.value",
                                                                  instanceClass.getName(), valueClass.getName()));
                }

                wsrInfo.setServiceInterfaceClassName(valueClass.getName());
                wsrInfo.setServiceRefTypeClassName(typeClass.getName());
            }
        }
    }
1156245
public SoapClient setMethod(String methodName) {
		return setMethod(methodName, ObjectUtil.defaultIfNull(this.namespaceURI, XMLConstants.NULL_NS_URI));
	}
458259
protected List<ValidationContext> parseValidationContexts(Element messageElement, BeanDefinitionBuilder builder) {
        List<ValidationContext> validationContexts = new ArrayList<>();
        if (messageElement != null) {
            String messageType = messageElement.getAttribute("type");
            if (!StringUtils.hasText(messageType)) {
                messageType = Citrus.DEFAULT_MESSAGE_TYPE;
            } else {
                builder.addPropertyValue("messageType", messageType);
            }

            HeaderValidationContext headerValidationContext = new HeaderValidationContext();
            validationContexts.add(headerValidationContext);

            String headerValidator = messageElement.getAttribute("header-validator");
            if (StringUtils.hasText(headerValidator)) {
                headerValidationContext.addHeaderValidator(headerValidator);
            }

            String headerValidatorExpression = messageElement.getAttribute("header-validators");
            if (StringUtils.hasText(headerValidatorExpression)) {
                Stream.of(headerValidatorExpression.split(","))
                        .map(String::trim)
                        .forEach(headerValidationContext::addHeaderValidator);
            }

            XmlMessageValidationContext xmlMessageValidationContext = getXmlMessageValidationContext(messageElement);
            validationContexts.add(xmlMessageValidationContext);

            XpathMessageValidationContext xPathMessageValidationContext = getXPathMessageValidationContext(messageElement, xmlMessageValidationContext);
            if (!xPathMessageValidationContext.getXpathExpressions().isEmpty()) {
                validationContexts.add(xPathMessageValidationContext);
            }

            JsonMessageValidationContext jsonMessageValidationContext = getJsonMessageValidationContext(messageElement);
            validationContexts.add(jsonMessageValidationContext);

            JsonPathMessageValidationContext jsonPathMessageValidationContext = getJsonPathMessageValidationContext(messageElement);
            if (!jsonPathMessageValidationContext.getJsonPathExpressions().isEmpty()) {
                validationContexts.add(jsonPathMessageValidationContext);
            }

            ScriptValidationContext scriptValidationContext = getScriptValidationContext(messageElement, messageType);
            if (scriptValidationContext != null) {
                validationContexts.add(scriptValidationContext);
            }

            ManagedList<RuntimeBeanReference> validators = new ManagedList<>();
            String messageValidator = messageElement.getAttribute("validator");
            if (StringUtils.hasText(messageValidator)) {
                validators.add(new RuntimeBeanReference(messageValidator));
            }

            String messageValidatorExpression = messageElement.getAttribute("validators");
            if (StringUtils.hasText(messageValidatorExpression)) {
                Stream.of(messageValidatorExpression.split(","))
                        .map(String::trim)
                        .map(RuntimeBeanReference::new)
                        .forEach(validators::add);
            }

            if (!validators.isEmpty()) {
                builder.addPropertyValue("validators", validators);
            }

            String dataDictionary = messageElement.getAttribute("data-dictionary");
            if (StringUtils.hasText(dataDictionary)) {
                builder.addPropertyReference("dataDictionary", dataDictionary);
            }
        } else {
            validationContexts.add(new HeaderValidationContext());
        }

        return validationContexts;
    }
197576
public void load( ServletContext servletContext )
    {
        _urlTemplates = new URLTemplates();
        InputStream xmlInputStream = null;
        InputStream xsdInputStream = null;

        try
        {
            xmlInputStream = servletContext.getResourceAsStream( _configFilePath );
            if ( xmlInputStream != null ) {
                /* load the XSD input stream */
                xsdInputStream = SCHEMA_RESOLVER.getInputStream();

                final String W3C_XML_SCHEMA = "http://www.w3.org/2001/XMLSchema";
                final String JAXP_SCHEMA_LANGUAGE = "http://java.sun.com/xml/jaxp/properties/schemaLanguage";
                final String JAXP_SCHEMA_SOURCE = "http://java.sun.com/xml/jaxp/properties/schemaSource";

                DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
                dbf.setValidating(true);
                dbf.setNamespaceAware(true);
                dbf.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
                dbf.setAttribute(JAXP_SCHEMA_SOURCE, xsdInputStream);

                DocumentBuilder db = dbf.newDocumentBuilder();

                /* add an ErrorHandler that just logs validation problems */
                db.setErrorHandler(new ErrorHandler() {
                    public void warning(SAXParseException exception) {
                        _log.info("Validation warning validating config file \"" + _configFilePath + "\" against XML Schema \"" + SCHEMA_RESOLVER.getResourcePath());
                    }

                    public void error(SAXParseException exception) {
                        _log.error("Validation errors occurred parsing the config file \"" + _configFilePath + "\".  Cause: " + exception, exception);
                    }

                    public void fatalError(SAXParseException exception) {
                        _log.error("Validation errors occurred parsing the config file \"" + _configFilePath + "\".  Cause: " + exception, exception);
                    }
                });

                db.setEntityResolver(new EntityResolver() {
                    public InputSource resolveEntity(String publicId, String systemId) {
                        if(systemId.endsWith("/url-template-config.xsd")) {
                            InputStream inputStream = DefaultURLTemplatesFactory.class.getClassLoader().getResourceAsStream(CONFIG_SCHEMA);
                            return new InputSource(inputStream);
                        }
                        else return null;
                    }
                });

                Document document = db.parse(xmlInputStream);
                Element root = document.getDocumentElement();
                loadTemplates( root );
                loadTemplateRefGroups( root );
       }
       else
       {
           if ( _log.isInfoEnabled() )
               _log.info( "Running without URL template descriptor, " + _configFilePath );
       }
   }
   catch ( ParserConfigurationException pce )
   {
       _log.error( "Problem loading URL template descriptor file " + _configFilePath, pce );
   }
   catch ( SAXException se )
   {
       _log.error( "Problem parsing URL template descriptor in " + _configFilePath, se );
   }
   catch ( IOException ioe )
   {
       _log.error( "Problem reading URL template descriptor file " + _configFilePath, ioe );
   }
   finally
   {
       // Close the streams
       try { if ( xmlInputStream != null ) xmlInputStream.close(); } catch ( Exception ignore ) {}
       try { if ( xsdInputStream != null ) xsdInputStream.close(); } catch( IOException ignore ) {}
   }
}
937583
public void validateWsFederationAuthenticationRequest(final RequestContext context) {
        val service = wsFederationCookieManager.retrieve(context);
        LOGGER.debug("Retrieved service [{}] from the session cookie", service);

        val request = WebUtils.getHttpServletRequestFromExternalWebflowContext(context);
        val wResult = request.getParameter(WRESULT);
        LOGGER.debug("Parameter [{}] received: [{}]", WRESULT, wResult);
        if (StringUtils.isBlank(wResult)) {
            LOGGER.error("No [{}] parameter is found", WRESULT);
            throw new IllegalArgumentException("Missing parameter " + WRESULT);
        }
        LOGGER.debug("Attempting to create an assertion from the token parameter");
        val rsToken = wsFederationHelper.getRequestSecurityTokenFromResult(wResult);
        val assertion = wsFederationHelper.buildAndVerifyAssertion(rsToken, configurations);
        if (assertion == null) {
            LOGGER.error("Could not validate assertion via parsing the token from [{}]", WRESULT);
            throw new IllegalArgumentException("Could not validate assertion via the provided token");
        }
        LOGGER.debug("Attempting to validate the signature on the assertion");
        if (!wsFederationHelper.validateSignature(assertion)) {
            val msg = "WS Requested Security Token is blank or the signature is not valid.";
            LOGGER.error(msg);
            throw new IllegalArgumentException(msg);
        }
        buildCredentialsFromAssertion(context, assertion, service);
    }
1182319
private void addSchemaInformationToValidationContext(Element messageElement, SchemaValidationContext context) {
        String schemaValidation = messageElement.getAttribute("schema-validation");
        if (StringUtils.hasText(schemaValidation)) {
            context.setSchemaValidation(Boolean.valueOf(schemaValidation));
        }

        String schema = messageElement.getAttribute("schema");
        if (StringUtils.hasText(schema)) {
            context.setSchema(schema);
        }

        String schemaRepository = messageElement.getAttribute("schema-repository");
        if (StringUtils.hasText(schemaRepository)) {
            context.setSchemaRepository(schemaRepository);
        }
    }
579704
@Override
    public void setApplicationContext(ApplicationContext applicationContext) {
        if (context == null) {
            synchronized (ApplicationContextHolder.class) {
                if (context == null) {
                    ApplicationContextHolder.context = applicationContext;
                }
            }
        }
    }
336499
@Override
    public boolean isValid(String value, ConstraintValidatorContext context) {
        try {
            this.duracloudUserService.checkUsername(value);
        } catch (InvalidUsernameException ex) {
            context.disableDefaultConstraintViolation();
            String message;
            if (ex instanceof ReservedUsernameException) {
                message = RESERVED_USERNAME_MESSAGE;
            } else if (ex instanceof ReservedPrefixException) {
                message = RESERVED_PREFIX_MESSAGE;
            } else {
                message = INVALID_USERNAME_MESSAGE;
            }

            message = MessageFormat.format(message, value);
            ConstraintViolationBuilder cvb =
                context.buildConstraintViolationWithTemplate(message);
            cvb.addConstraintViolation();
            return false;
        } catch (UserAlreadyExistsException ex) {
            return false;
        }

        return true;
    }
503915
public int resolveAndValidateElement()
        throws XMLStreamException
    {
        if (mDepth == 0) { // just a simple sanity check
            throw new IllegalStateException("Calling validate() on empty stack.");
        }
        AttributeCollector ac = mAttrCollector;

        // Any namespace declarations?
        {
            int nsCount = ac.getNsCount();
            if (nsCount > 0) {
                /* let's first invalidate old (possibly) shared ns ctxt too,
                 * if we had one; new one can be created at a later point
                 */
                mLastNsContext = null;

                boolean internNsUris = mConfig.willInternNsURIs();
                for (int i = 0; i < nsCount; ++i) {
                    Attribute ns = ac.resolveNamespaceDecl(i, internNsUris);
                    String nsUri = ns.mNamespaceURI;
                    // note: for namespaces, prefix is stored as local name
                    String prefix = ns.mLocalName;

                    /* 18-Jul-2004, TSa: Need to check that 'xml' and 'xmlns'
                     *   prefixes are not re-defined (and 'xmlns' not even
                     *   defined to its correct ns).
                     */
                    if (prefix == "xmlns") {
                        // xmlns can never be declared, even to its correct URI
                        mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XMLNS);
                    } else if (prefix == "xml") {
                        // whereas xml is ok, as long as it's same URI:
                        if (!nsUri.equals(XMLConstants.XML_NS_URI)) {
                            mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XML,
                                                      nsUri, null);
                        }
                        /* 09-Feb-2006, TSa: Hmmh. Now, should this explicit
                         *   xml declaration be visible to the app? SAX API
                         *   seem to ignore it.
                         */
                        //mNamespaces.addStrings(prefix, nsUri);
                    } else { // ok, valid prefix, so far
                        /* 17-Mar-2006, TSa: Unbinding default NS needs to
                         *    result in null being added:
                         */
                        if (nsUri == null || nsUri.length() == 0) {
                            nsUri = XmlConsts.DEFAULT_NAMESPACE_URI;
                        }
                        // The default ns binding needs special handling:
                        if (prefix == null) {
                            mCurrElement.mDefaultNsURI = nsUri;
                        }

                        /* But then let's ensure that URIs matching xml
                         * and xmlns are not being bound to anything else
                         */
                        if (internNsUris) { // identity comparison is ok:
                            if (nsUri == XMLConstants.XML_NS_URI) {
                                mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XML_URI, prefix, null);
                            } else if (nsUri == XMLConstants.XMLNS_ATTRIBUTE_NS_URI) {
                                mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XMLNS_URI);
                            }
                        } else { // need to check equals()
                            if (nsUri.equals(XMLConstants.XML_NS_URI)) {
                                mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XML_URI, prefix, null);
                            } else if (nsUri.equals(XMLConstants.XMLNS_ATTRIBUTE_NS_URI)) {
                                mReporter.throwParseError(ErrorConsts.ERR_NS_REDECL_XMLNS_URI);
                            }
                        }
                        /* and at any rate, binding needs to be added, to
                         * be visible to the app (including def ns):
                         */
                        mNamespaces.addStrings(prefix, nsUri);
                    }
                }
            }
        }

        /* 20-Feb-2006, TSa: Any attribute defaults for namespace declaration
         *   pseudo-attributes?
         */
        if (mMayHaveNsDefaults) {
            mNsDefaultProvider.checkNsDefaults(this);
        }

        // Then, let's set element's namespace, if any:
        String prefix = mCurrElement.mPrefix;
        String ns;

        if (prefix == null) { // use default NS, if any
            ns = mCurrElement.mDefaultNsURI;
        } else if (prefix == "xml") {
            ns = XMLConstants.XML_NS_URI;
        } else {
            // Need to find namespace with the prefix:
            ns = mNamespaces.findLastFromMap(prefix);
            /* 07-Sep-2007, TSa: "no namespace" should now be indicated
             *   by an empty string, however, due to historical reasons
             *   let's be bit defensive and allow nulls for the same too
             */
            if (ns == null || ns.length() == 0) {
                mReporter.throwParseError(ErrorConsts.ERR_NS_UNDECLARED, prefix, null);
            }
        }
        mCurrElement.mNamespaceURI = ns;

        // And finally, resolve attributes' namespaces too:
        int xmlidIx = ac.resolveNamespaces(mReporter, mNamespaces);
        mIdAttrIndex = xmlidIx;

        XMLValidator vld = mValidator;
        /* If we have no validator(s), nothing more to do,
         * except perhaps little bit of Xml:id handling:
         */
        if (vld == null) { // no validator in use
            if (xmlidIx >= 0) { // need to normalize xml:id, still?
                ac.normalizeSpacesInValue(xmlidIx);
            }
            return XMLValidator.CONTENT_ALLOW_ANY_TEXT;
        }

        // Otherwise need to call relevant validation methods.

        /* First, a call to check if the element itself may be acceptable
         * within structure:
         */
        vld.validateElementStart
            (mCurrElement.mLocalName, mCurrElement.mNamespaceURI, mCurrElement.mPrefix);

        // Then attributes, if any:
        int attrLen = ac.getCount();
        if (attrLen > 0) {
            for (int i = 0; i < attrLen; ++i) {
                ac.validateAttribute(i, mValidator);
            }
        }

        /* And finally let's wrap things up to see what textual content
         * is allowed as child content, if any:
         */
        return mValidator.validateElementAndAttributes();
    }
799732
protected final void setApplicationName(String applicationName) throws IllegalArgumentException {
        validateNotEmpty(applicationName, "applicationName");
        synchronized (this) {
            properties.put(APPLICATION_NAME, applicationName);
        }
    }
234259
public void afterPropertiesSet() throws Exception {
        // try to find xml message validator in registry
        for (MessageValidator<? extends ValidationContext> messageValidator : messageValidatorRegistry.getMessageValidators()) {
            if (messageValidator instanceof DomXmlMessageValidator &&
                    messageValidator.supportsMessageType(MessageType.XML.name(), new DefaultMessage(""))) {
                xmlMessageValidator = (DomXmlMessageValidator) messageValidator;
            }
        }

        if (xmlMessageValidator == null) {
            LOG.warn("No XML message validator found in Spring bean context - setting default validator");
            xmlMessageValidator = new DomXmlMessageValidator();
            xmlMessageValidator.setApplicationContext(applicationContext);
        }
    }
531144
@Override
	public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
		try {
			HashSet<Class<?>> registeredTypes = new HashSet<>();

			// Get Service Broker
			ServiceBroker broker = applicationContext.getBean(ServiceBroker.class);

			// Find Services in Spring Application Context
			Map<String, Service> serviceMap = applicationContext.getBeansOfType(Service.class);
			if (serviceMap != null && !serviceMap.isEmpty()) {
				String name;
				for (Map.Entry<String, Service> service : serviceMap.entrySet()) {

					// Register Service in Broker
					name = service.getKey();
					registeredTypes.add(service.getClass());
					if (name != null && name.startsWith("$")) {
						broker.createService(name, service.getValue());
						logger.info("Service \"" + name + "\" registered.");
					} else {
						Service instance = service.getValue();
						broker.createService(instance);
						logger.info("Service \"" + instance.getName() + "\" registered.");
					}
				}
			}

			// Add new Services
			if (packagesToScan != null && packagesToScan.length > 0) {
				DefaultListableBeanFactory beanFactory = (DefaultListableBeanFactory) applicationContext
						.getAutowireCapableBeanFactory();
				for (String packageName : packagesToScan) {
					if (!packageName.isEmpty()) {
						LinkedList<String> classNames = scan(packageName);
						for (String className : classNames) {
							if (className.indexOf('$') > -1) {
								continue;
							}
							className = packageName + '.' + className;
							Class<?> type = Class.forName(className);
							if (Service.class.isAssignableFrom(type)) {

								// Check type
								if (!registeredTypes.add(type)) {
									continue;
								}

								// Register Service in Spring
								String name = nameOf(type, false);
								BeanDefinition definition = BeanDefinitionBuilder.genericBeanDefinition(type)
										.setScope(BeanDefinition.SCOPE_SINGLETON)
										.setAutowireMode(DefaultListableBeanFactory.AUTOWIRE_BY_TYPE).setLazyInit(false)
										.getBeanDefinition();
								beanFactory.registerBeanDefinition(name, definition);
								Service service = (Service) beanFactory.createBean(type);

								// Register Service in Broker
								broker.createService(service);

								// Log
								logger.info("Service \"" + name + "\" registered.");
							}
						}
					}
				}
			}
		} catch (Exception cause) {
			throw new FatalBeanException("Unable to define Moleculer Service!", cause);
		}
	}
386410
public void validate(final ValidationContext context) {
        if (!context.getUserEvent().equalsIgnoreCase("submit")) {
            return;
        }

        val messages = context.getMessageContext();
        ApplicationContextProvider.getCasConfigurationProperties().ifPresent(props -> {
            if (StringUtils.isBlank(source) && props.getAuthn().getPolicy().isSourceSelectionEnabled()) {
                messages.addMessage(new MessageBuilder()
                    .error()
                    .source("source")
                    .code("source.required")
                    .build());
            }
        });
    }
298318
private ControllerErrorHandler getContextErrorHandler(XmlWebApplicationContext context) {
        ControllerErrorHandler errorHandler = null;
        String[] names = context.getBeanNamesForType(ControllerErrorHandler.class);
        for (int i = 0; errorHandler == null && i < names.length; i++) {
            errorHandler = (ControllerErrorHandler) context.getBean(names[i]);
            Class<?> userClass = ClassUtils.getUserClass(errorHandler);
            if (userClass.isAnnotationPresent(Ignored.class)) {
                logger.debug("Ignored controllerErrorHandler: " + errorHandler);
                errorHandler = null;
                continue;
            }
        }
        return errorHandler;
    }
628044
public static StringValueResolver prepScheduledAnnotationBeanPostProcessor(final ApplicationContext applicationContext) {
        val resolver = new CasEmbeddedValueResolver(applicationContext);
        try {
            val sch = applicationContext.getBean(ScheduledAnnotationBeanPostProcessor.class);
            sch.setEmbeddedValueResolver(resolver);
        } catch (final NoSuchBeanDefinitionException e) {
            LOGGER.warn("Unable to locate [ScheduledAnnotationBeanPostProcessor] as a bean. Support for duration syntax (i.e. PT2S) may not be available");
            LOGGER.trace(e.getMessage(), e);
        }
        return resolver;
    }