Spring Framework DefaultBeanDefinitionDocumentReader - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework DefaultBeanDefinitionDocumentReader class.

This code example shows how to use the following methods:getReaderContext, parseBeanDefinitions
    @Override 
    protected void parseBeanDefinitions(Element root, BeanDefinitionParserDelegate delegate)
    { 
        if (!StringUtils.hasLength(root.getNamespaceURI()))
        { 
            getReaderContext().error("Unable to locate NamespaceHandler for namespace [null]", root);
        } 
        else 
        { 
            super.parseBeanDefinitions(root, delegate);
        } 
    } 
 
} 
6
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
 * to true, usefull when loading a context during testing or with command line tools. 
 *  
 * @author Eric Dalquist 
 * @version $Revision$ 
 */ 
public class LazyInitByDefaultBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader {
    @Override 
    protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate) {
        root.setAttribute(BeanDefinitionParserDelegate.DEFAULT_LAZY_INIT_ATTRIBUTE, "true");
        return super.createHelper(readerContext, root, parentDelegate);
    } 
} 
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    /** 
     * 在有schema验证的情况下,部分attribute的默认值是由schema提供的。当没有schema验证时,这些默认值便不复存在, 
     * 这导致spring的行为在<code>-DskipValidation</code> 
     * 时和原来不同。本类继承了spring的原有类,但对缺失的默认值提供明确的值。 
     */ 
    public static class DocumentReaderSkippingValidation extends DefaultBeanDefinitionDocumentReader {
        private Environment environment;
 
        public Environment getEnvironment() {
            return environment;
        } 
 
        @Override 
        public void setEnvironment(Environment environment) {
            this.environment = environment;
            super.setEnvironment(environment);
        } 
 
        @Override 
        protected BeanDefinitionParserDelegate createHelper(XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate) {
5
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
    */ 
   protected static void postInitBeanDefinitionReader(XmlBeanDefinitionReader reader) {
      reader.setDocumentReaderClass(AlwaysLazyInitBeanDefinitionDocumentReader.class);
   } 
 
   protected static class AlwaysLazyInitBeanDefinitionDocumentReader extends DefaultBeanDefinitionDocumentReader {
      @Override 
      protected BeanDefinitionParserDelegate createHelper(
            XmlReaderContext readerContext, Element root, BeanDefinitionParserDelegate parentDelegate) {
         BeanDefinitionParserDelegate helper = super.createHelper(readerContext, root, parentDelegate);
         helper.getDefaults().setLazyInit("true");
         return helper;
      } 
   } 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:
	/** 
	 * <p> 
	 * Creates a new {@link JsrBeanDefinitionDocumentReader} instance. 
	 * </p> 
	 */ 
	public JsrBeanDefinitionDocumentReader() { } 
 
	/** 
	 * <p> 
	 * Create a new {@link JsrBeanDefinitionDocumentReader} instance with the provided 
	 * {@link BeanDefinitionRegistry}. 
	 * </p> 
	 * 
	 * @param beanDefinitionRegistry the {@link BeanDefinitionRegistry} to use 
	 */ 
	public JsrBeanDefinitionDocumentReader(BeanDefinitionRegistry beanDefinitionRegistry) {
		this.beanDefinitionRegistry = beanDefinitionRegistry;
	} 
 
	@Override 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
This code example shows how to use the following methods:getReaderContext, parseBeanDefinitions
    @Override 
    protected void parseBeanDefinitions(Element root, BeanDefinitionParserDelegate delegate)
    { 
        if (!StringUtils.hasLength(root.getNamespaceURI()))
        { 
            getReaderContext().error("Unable to locate NamespaceHandler for namespace [null]", root);
        } 
        else 
        { 
            super.parseBeanDefinitions(root, delegate);
        } 
    } 
 
} 
4
CodeRank
Connect your IDE to all the code out there  Get Codota for Java
See Code Examples for Spring Framework DefaultBeanDefinitionDocumentReader Methods: