Examples of UrlResource


Examples of org.springframework.core.io.UrlResource

     * @return
     */

    protected UrlResource getBeanDefinitionsResource() {

        UrlResource urlRes = null;
        String url = System.getProperty(CONFIG_FILE_PROPERTY_NAME);
        if (null != url) {
            try {
                urlRes = new UrlResource(url);
            } catch (MalformedURLException ex) {
                // continue using default configuration
                LOG.log(Level.WARNING, new Message("MALFORMED_URL_MSG", LOG, url).toString(), ex);
            }

View Full Code Here

Examples of org.springframework.core.io.UrlResource

    }
   
    public void testConstructor() {
      
        URL url = CeltixXmlBeanFactoryTest.class.getResource("resources/top2.xml");  
        UrlResource urlRes = new UrlResource(url);
        CeltixXmlBeanFactory bf = new CeltixXmlBeanFactory(urlRes);
       
        assertNotNull(bf);
      
    }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

    }
   
    public void testCustomEditorRegistration() {
       
        URL url = CeltixXmlBeanFactoryTest.class.getResource("resources/top2.xml");
        UrlResource urlRes = new UrlResource(url);
        CeltixXmlBeanFactory bf = new CeltixXmlBeanFactory(urlRes);
        Configuration top = new TopConfigurationBuilder().build("top22");
       
        Map map = bf.getCustomEditors();
       
View Full Code Here

Examples of org.springframework.core.io.UrlResource

    }
   
    public void testPropertyEditorConversionFailure() throws InvocationTargetException,
        NoSuchMethodException, IllegalAccessException {
        URL url = CustomPropertyEditorsTest.class.getResource("resources/top3.xml");
        UrlResource urlRes = new UrlResource(url);
        CeltixXmlBeanFactory bf = new CeltixXmlBeanFactory(urlRes);
        Configuration top = new TopConfigurationBuilder().build("top3");
        bf.registerCustomEditors(top);
        Configuration leaf = new LeafConfigurationBuilder().build(top, "leaf");
        bf.registerCustomEditors(leaf);
View Full Code Here

Examples of org.springframework.core.io.UrlResource

  }

  protected void refreshSessionFactory() {
    Set<Resource> cfgs = CollectUtils.newHashSet();
    for (URL config : configs) {
      cfgs.add(new UrlResource(config));
    }
    Resource[] configLocations = new Resource[cfgs.size()];
    cfgs.toArray(configLocations);
    setConfigLocations(configLocations);
    try {
View Full Code Here

Examples of org.springframework.core.io.UrlResource

  public void postProcessBeanDefinitionRegistry(BeanDefinitionRegistry registry) throws BeansException {
    if (null == resource || resource.isEmpty()) return;
    BeanDefinitionReader reader = new BeanDefinitionReader();
    for (URL url : resource.getAllPaths()) {
      List<ReconfigBeanDefinitionHolder> holders = reader.load(new UrlResource(url));
      for (ReconfigBeanDefinitionHolder holder : holders) {
        if (holder.getConfigType().equals(ReconfigType.REMOVE)) {
        } else {
          BeanDefinition definition = null;
          try {
View Full Code Here

Examples of org.springframework.core.io.UrlResource

  public Resource[] getGlobals() {
    if (null == global) {
      return new Resource[0];
    } else {
      return new Resource[] { new UrlResource(global) };
    }
  }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

  public Resource[] getUsers() {
    if (null == user) {
      return new Resource[0];
    } else {
      return new Resource[] { new UrlResource(user) };
    }
  }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

  public Resource[] getLocations() {
    Resource[] resources = new Resource[locals.size()];
    int i = 0;
    for (URL location : locals) {
      resources[i++] = new UrlResource(location);
    }
    return resources;
  }
View Full Code Here

Examples of org.springframework.core.io.UrlResource

        GenericApplicationContext appContext = new GenericApplicationContext(busApplicationContext);
        XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(appContext);
        List<URL> urls = ClassLoaderUtils.getResources("META-INF/cxf/java2wsbeans.xml",
                                                       SpringServiceBuilderFactory.class);
        for (URL url : urls) {
            reader.loadBeanDefinitions(new UrlResource(url));
        }
       
        for (String pathname : additionalFilePathnames) {
            try {
                reader.loadBeanDefinitions(new FileSystemResource(pathname));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.