Package org.springframework.core.io

Examples of org.springframework.core.io.ClassPathResource


   
    private XmlBeanFactory context;
   
    @Before
    public void setUp() {
        context = new XmlBeanFactory(new ClassPathResource("test-intercept-handlers-context.xml"));
    }
View Full Code Here


        assertNotNull(featureService);
    }
   
   
    private void setupContext(String contextLocation) {
        context = new XmlBeanFactory(new ClassPathResource(contextLocation));
    }
View Full Code Here

    protected void setUp() throws Exception {
        super.setUp();
        factory = new MappingDescriptorFactoryBean();

        mappingA = new ClassPathResource("/org/springmodules/jcr/mapping/mappingA.xml");
        mappingB = new ClassPathResource("/org/springmodules/jcr/mapping/mappingB.xml");

        res = new Resource[] { mappingA, mappingB };
    }
View Full Code Here

      fail("ruleAdministrator, ruleRuntime and source not set");
    }
    catch (IllegalArgumentException ex) {
      // expected
    }
    source.setSource(new ClassPathResource(RULES_RESOURCE));
    try {
      source.afterPropertiesSet();
      fail("ruleAdministrator, ruleRuntime not set");
    }
    catch (IllegalArgumentException ex) {
View Full Code Here

  /* (non-Javadoc)
   * @see org.springmodules.jsr94.factory.AbstractDefaultRuleSourceTests#setProperties(org.springmodules.jsr94.rulesource.DefaultRuleSource)
   */
  protected void setProperties(DefaultRuleSource ruleSource) throws Exception {
    ruleSource.setBindUri(BIND_URI);
    ruleSource.setSource(new ClassPathResource(RULES_RESOURCE));
    ruleSource.setRuleAdministrator(ruleAdministrator);
    ruleSource.setRuleServiceProvider(null);
    ruleSource.setRuleRuntime(ruleRuntime);
  }
View Full Code Here

    private DefaultXmlBeanValidationConfigurationLoader loader;

    protected void setUp() throws Exception {
        loader = new DefaultXmlBeanValidationConfigurationLoader();
        loader.setResource(new ClassPathResource("Person.vld.xml", getClass()));
        loader.afterPropertiesSet();
    }
View Full Code Here

    } else {
      secondParent = parent;
    }
   
    if (bflContextConfigLocation != null) {
      beanReferences = BFLUtils.parse(new ClassPathResource(bflContextConfigLocation), secondParent);
    } else {
      beanReferences = BFLUtils.parse(new ClassPathResource("applicationContext.bfl"), secondParent);
    }
   
    return new XmlWebApplicationContextDriver().getWebApplicationContext(beanReferences, secondParent);
  }
View Full Code Here

        logger.debug("Trying to locate [" + dtdFile + "] under ["
            + SEARCH_PACKAGE + "]");
      }

      try {
        Resource resource = new ClassPathResource(SEARCH_PACKAGE + dtdFile,
            getClass());
        InputSource source = new InputSource(resource.getInputStream());
        source.setPublicId(publicId);
        source.setSystemId(systemId);

        if (logger.isDebugEnabled()) {
          logger.debug("Found beans DTD [" + systemId + "] in classpath");
View Full Code Here

      fail("ruleAdministrator, ruleRuntime and source not set");
    }
    catch (IllegalArgumentException ex) {
      // expected
    }
    source.setSource(new ClassPathResource(RULES_RESOURCE));
    try {
      source.afterPropertiesSet();
      fail("ruleAdministrator, ruleRuntime not set");
    }
    catch (IllegalArgumentException ex) {
View Full Code Here

  /* (non-Javadoc)
   * @see org.springmodules.jsr94.factory.AbstractDefaultRuleSourceTests#setProperties(org.springmodules.jsr94.rulesource.DefaultRuleSource)
   */
  protected void setProperties(DefaultRuleSource ruleSource) throws Exception {
    ruleSource.setBindUri(BIND_URI);
    ruleSource.setSource(new ClassPathResource(RULES_RESOURCE));
    ruleSource.setRuleAdministrator(null);
    ruleSource.setRuleServiceProvider(getProvider());
    ruleSource.setRuleRuntime(null);
  }
View Full Code Here

TOP

Related Classes of org.springframework.core.io.ClassPathResource

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.