Example usage for org.springframework.jdbc.config SortedResourcesFactoryBean SortedResourcesFactoryBean

List of usage examples for org.springframework.jdbc.config SortedResourcesFactoryBean SortedResourcesFactoryBean

Introduction

In this page you can find the example usage for org.springframework.jdbc.config SortedResourcesFactoryBean SortedResourcesFactoryBean.

Prototype

public SortedResourcesFactoryBean(ResourceLoader resourceLoader, List<String> locations) 

Source Link

Usage

From source file:org.teiid.spring.autoconfigure.MultiDataSourceInitializer.java

private Resource[] doGetResources(String location) {
    try {//  w w  w  .j ava2 s  .  c o m
        SortedResourcesFactoryBean factory = new SortedResourcesFactoryBean(this.applicationContext,
                Collections.singletonList(location));
        factory.afterPropertiesSet();
        return factory.getObject();
    } catch (Exception ex) {
        throw new IllegalStateException("Unable to load resources from " + location, ex);
    }
}

From source file:org.teiid.spring.autoconfigure.TeiidInitializer.java

private static Resource[] doGetResources(String location, ApplicationContext context) {
    try {/*w ww  .  j  a  va  2s .  co  m*/
        SortedResourcesFactoryBean factory = new SortedResourcesFactoryBean(context,
                Collections.singletonList(location));
        factory.afterPropertiesSet();
        return factory.getObject();
    } catch (Exception ex) {
        throw new IllegalStateException("Unable to load resources from " + location, ex);
    }
}