Class ResourceKeyConverterAdapter<T extends java.security.Key>
- java.lang.Object
-
- org.springframework.security.converter.ResourceKeyConverterAdapter<T>
-
- 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 anyKey
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 aResourceLoader
- Since:
- 5.5
-
-
Constructor Summary
Constructors Constructor Description ResourceKeyConverterAdapter(org.springframework.core.convert.converter.Converter<java.io.InputStream,T> delegate)
Construct aResourceKeyConverterAdapter
with the provided parameters
-
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 thisResourceLoader
to read the key material
-
-
-
Constructor Detail
-
ResourceKeyConverterAdapter
public ResourceKeyConverterAdapter(org.springframework.core.convert.converter.Converter<java.io.InputStream,T> delegate)
Construct aResourceKeyConverterAdapter
with the provided parameters- Parameters:
delegate
- converts a stream of key material into aKey
-
-
Method Detail
-
convert
public T convert(java.lang.String source)
- Specified by:
convert
in interfaceorg.springframework.core.convert.converter.Converter<java.lang.String,T extends java.security.Key>
-
setResourceLoader
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Use thisResourceLoader
to read the key material- Parameters:
resourceLoader
- theResourceLoader
to use
-
-