Class ResourceLoaderUtils


  • public abstract class ResourceLoaderUtils
    extends io.microsphere.util.BaseUtils
    The utilities class for Spring ResourceLoader
    Since:
    1.0.0
    Author:
    Mercy
    See Also:
    ResourceLoader
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      protected static java.lang.ClassLoader getClassLoader​(org.springframework.core.io.ResourceLoader resourceLoader)  
      static org.springframework.core.io.ResourceLoader getResourceLoader()
      Get the instance of ResourceLoader associating the default ClassLoader
      static org.springframework.core.io.ResourceLoader getResourceLoader​(java.lang.ClassLoader classLoader)
      Get the instance of ResourceLoader associating the specified ClassLoader
      static org.springframework.core.io.support.ResourcePatternResolver getResourcePatternResolver()
      Get the instance of ResourcePatternResolver associating the default ClassLoader
      static org.springframework.core.io.support.ResourcePatternResolver getResourcePatternResolver​(org.springframework.core.io.ResourceLoader resourceLoader)
      Get the instance of ResourcePatternResolver from the specified ResourceLoader
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ResourceLoaderUtils

        public ResourceLoaderUtils()
    • Method Detail

      • getResourceLoader

        @NonNull
        public static org.springframework.core.io.ResourceLoader getResourceLoader()
        Get the instance of ResourceLoader associating the default ClassLoader
        Returns:
        non-null
      • getResourceLoader

        @NonNull
        public static org.springframework.core.io.ResourceLoader getResourceLoader​(@Nullable
                                                                                   java.lang.ClassLoader classLoader)
        Get the instance of ResourceLoader associating the specified ClassLoader
        Parameters:
        classLoader - nullable ClassLoader
        Returns:
        non-null
      • getResourcePatternResolver

        @NonNull
        public static org.springframework.core.io.support.ResourcePatternResolver getResourcePatternResolver()
        Get the instance of ResourcePatternResolver associating the default ClassLoader
        Returns:
        non-null
      • getResourcePatternResolver

        @NonNull
        public static org.springframework.core.io.support.ResourcePatternResolver getResourcePatternResolver​(@Nullable
                                                                                                             org.springframework.core.io.ResourceLoader resourceLoader)
        Get the instance of ResourcePatternResolver from the specified ResourceLoader
        Parameters:
        resourceLoader - nullable ResourceLoader
        Returns:
        non-null
      • getClassLoader

        protected static java.lang.ClassLoader getClassLoader​(@Nullable
                                                              org.springframework.core.io.ResourceLoader resourceLoader)