public URL getResource(String resource) {
        resource = resource.trim();

        URL result = Thread.currentThread().getContextClassLoader().getResource(resource);

        // Could not find resource. Try with the classloader that loaded this class.
        if (result == null) {
            ClassLoader classLoader = ResourceLoader.class.getClassLoader();
            if (classLoader != null) {
                result = classLoader.getResource(resource);
            }
        }

        // Last ditch attempt searching classpath
        if (result == null) {
            result = ClassLoader.getSystemResource(resource);
        }

        // one more time
        if (result == null && StringUtils.contains(resource, ":")) {
            try {
                result = new URL(resource);
            } catch (MalformedURLException e) {
                MappingUtils.throwMappingException(e);
            }
        }

        return result;
    }
Internal class that loads resources from the classpath. Also supports loading
resources outside of the classpath if it is prepended with "file:". Only
intended for internal use.
core/src/main/java/com/github/dozermapper/core/util/ResourceLoader.java