code: public static URL getResource(String name) {
          URL resource = null;
          try {
              if (Thread.currentThread().getContextClassLoader() != null) {
                  resource = Thread.currentThread().getContextClassLoader().getResource(name);
              }
          } catch (SecurityException e) {
              LOG.info("Unable to access context classloader, using default. " + e.getMessage());
          }
          if (resource == null) {
              resource = ResourceLoader.class.getResource("/" + name);
          }
          return resource;
      }
docs: Load a resource via the thread context classloader. If security permissions don't allow
  this fallback to loading via current classloader.
  
  @param name a resource name
  @return a {@link URL} or null if resource is not found