Class ExternalResourceLoader

  • All Implemented Interfaces:
    org.springframework.core.io.ResourceLoader

    public class ExternalResourceLoader
    extends java.lang.Object
    implements org.springframework.core.io.ResourceLoader
    • Field Detail

      • RESOURCES_FOLDER

        public static final java.lang.String RESOURCES_FOLDER
        See Also:
        Constant Field Values
      • RESOURCE_PREFIXES

        public static final java.lang.String[] RESOURCE_PREFIXES
      • DEFAULT_RESOURCE_PREFIX

        public static final java.lang.String DEFAULT_RESOURCE_PREFIX
      • NAE_RESOURCE_PREFIX

        public static final java.lang.String NAE_RESOURCE_PREFIX
      • NAE_RESOURCE_RESOURCE_PREFIX

        public static final java.lang.String NAE_RESOURCE_RESOURCE_PREFIX
      • NR_RESOURCE_PREFIX

        public static final java.lang.String NR_RESOURCE_PREFIX
    • Constructor Detail

      • ExternalResourceLoader

        public ExternalResourceLoader​(org.springframework.core.io.ResourceLoader delegate)
    • Method Detail

      • getResource

        public org.springframework.core.io.Resource getResource​(java.lang.String location)
        Specified by:
        getResource in interface org.springframework.core.io.ResourceLoader
      • getClassLoader

        public java.lang.ClassLoader getClassLoader()
        Specified by:
        getClassLoader in interface org.springframework.core.io.ResourceLoader
      • getExternalResourcePrefix

        public static java.util.Optional<java.lang.String> getExternalResourcePrefix​(java.lang.String location)
        Get detected resource prefix if the location is an external resource.
        Parameters:
        location - Resource location
        Returns:
        Optional of resource prefix. If the location is not external resource, empty Optional is returned.