All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netgrif.application.engine.utils.ResourceFileLoader Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.3.3
Show newest version
package com.netgrif.application.engine.utils;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.core.io.ResourceLoader;
import org.springframework.stereotype.Component;

import java.io.File;
import java.io.IOException;

@Component
public class ResourceFileLoader {

    private static ResourceLoader resourceLoader;

    @Autowired
    public void setResourceLoader(@Qualifier("webApplicationContext") ResourceLoader resourceLoader) {
        ResourceFileLoader.resourceLoader = resourceLoader;
    }

    public static File loadResourceFile(String path) throws IOException {
        return resourceLoader.getResource(path).getFile();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy