class ApplicationDiscovery {

    public List<Resource> discoverApplications() {
        List<Resource> resources = new ArrayList<>();
        Resource resource = resourceLoader.getResource(applicationsLocation);
        if (resource.exists()) {
            try {
                resources = Arrays.asList(resourceLoader.getResources(applicationsLocation + "**.zip"));
            } catch (IOException e) {
                throw new AppliationLoadException("Unable to load application resources", e);
            }
        }
        return resources;
    }

    public  ApplicationDiscovery(ResourcePatternResolver resourceLoader,
                                String applicationsLocation);

}