Spring Cloud has a pre-processor that decrypts property values locally Environment . It follows the same rules as the Config server, and by encrypt.* having the same external configuration. Therefore, you can use {cipher}* encrypted values in a format that, as long as there is a valid key, will be decrypted before the main application context gets fetched Environment . To use the encryption feature in your application, you need to include Spring security RSA (MAVEN coordinated "Org.springframework.security:spring-security-rsa") in your classpath. And you need a comprehensive, powerful JCE to extend your JVM.
If an exception is caused by an "illegal key size" and you are using Sun's JDK, you will need to install the Java Encryption Extensions (JCE) infinite Strength management policy file. For more information, see the following links:
Java 6 JCE
Java 7 JCE
Java 8 JCE
Unzip the file to the Jdk/jre/lib/security folder (regardless of which version of JRE/JDK x64/x86 you are using).
Endpoint
For spring boot executor applications, there are additional administrative endpoints:
Post to /env to update Environment and rebind @ConfigurationProperties and log levels
/refreshReload the boot band context and refresh the @RefreshScope bean
/restartShutdown ApplicationContext and restart (disabled by default)
/pauseand /resume calling Lifecycle methods ( stop() and start() ApplicationContext )
Source Source
Spring Cloud Tutorial (12) encryption and decryption