Class ResourceKeyConverterAdapter<T extends java.security.Key>

  • All Implemented Interfaces:
    org.springframework.core.convert.converter.Converter<java.lang.String,​T>

    public class ResourceKeyConverterAdapter<T extends java.security.Key>
    extends java.lang.Object
    implements org.springframework.core.convert.converter.Converter<java.lang.String,​T>
    Adapts any Key Converter into once that will first extract that key from a resource. By default, keys can be read from the file system, the classpath, and from HTTP endpoints. This can be customized by providing a ResourceLoader
    Since:
    5.5
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T convert​(java.lang.String source)
      void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)
      Use this ResourceLoader to read the key material
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.springframework.core.convert.converter.Converter

        andThen
    • Constructor Detail

      • ResourceKeyConverterAdapter

        public ResourceKeyConverterAdapter​(org.springframework.core.convert.converter.Converter<java.io.InputStream,​T> delegate)
        Construct a ResourceKeyConverterAdapter with the provided parameters
        Parameters:
        delegate - converts a stream of key material into a Key
    • Method Detail

      • convert

        public T convert​(java.lang.String source)
        Specified by:
        convert in interface org.springframework.core.convert.converter.Converter<java.lang.String,​T extends java.security.Key>
      • setResourceLoader

        public void setResourceLoader​(org.springframework.core.io.ResourceLoader resourceLoader)
        Use this ResourceLoader to read the key material
        Parameters:
        resourceLoader - the ResourceLoader to use