Class CipherResourceJsonEncryptor
java.lang.Object
org.springframework.cloud.config.server.encryption.CipherResourceJsonEncryptor
- All Implemented Interfaces:
ResourceEncryptor
ResourceEncryptor
implementation that can decrypt property values prefixed with {cipher} marker in a JSON
file.- Author:
- Sean Stiglitz
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdecryptValue(String value, String name, String[] profiles) protected StringdecryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.core.json.JsonFactory factory) protected StringdecryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.core.JsonParser parser) protected StringdecryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.dataformat.yaml.YAMLFactory factory)
-
Field Details
-
CIPHER_MARKER
- See Also:
-
-
Constructor Details
-
CipherResourceJsonEncryptor
-
-
Method Details
-
getSupportedExtensions
- Specified by:
getSupportedExtensionsin interfaceResourceEncryptor
-
decrypt
public String decrypt(String text, org.springframework.cloud.config.environment.Environment environment) throws IOException - Specified by:
decryptin interfaceResourceEncryptor- Throws:
IOException
-
decryptWithJacksonParser
protected String decryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.core.json.JsonFactory factory) throws IOException - Throws:
IOException
-
decryptWithJacksonParser
protected String decryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.dataformat.yaml.YAMLFactory factory) throws IOException - Throws:
IOException
-
decryptWithJacksonParser
protected String decryptWithJacksonParser(String text, String name, String[] profiles, tools.jackson.core.JsonParser parser) throws IOException - Throws:
IOException
-
decryptValue
-