public class ResourceKeyConverterAdapter<T extends java.security.Key>
extends java.lang.Object
implements org.springframework.core.convert.converter.Converter<java.lang.String,T>
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
Constructor and Description |
---|
ResourceKeyConverterAdapter(org.springframework.core.convert.converter.Converter<java.io.InputStream,T> delegate)
Construct a
ResourceKeyConverterAdapter with the provided parameters |
Modifier and Type | Method and Description |
---|---|
T |
convert(java.lang.String source) |
void |
setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
Use this
ResourceLoader to read the key material |
public ResourceKeyConverterAdapter(org.springframework.core.convert.converter.Converter<java.io.InputStream,T> delegate)
ResourceKeyConverterAdapter
with the provided parametersdelegate
- converts a stream of key material into a Key
public T convert(java.lang.String source)
convert
in interface org.springframework.core.convert.converter.Converter<java.lang.String,T extends java.security.Key>
public void setResourceLoader(org.springframework.core.io.ResourceLoader resourceLoader)
ResourceLoader
to read the key materialresourceLoader
- the ResourceLoader
to use