org.apache.tomcat.util.IntrospectionUtils.SecurePropertySource
that uses environment variables to resolve expressions.
Usage example:
Configure the certificate with environment variables.
<SSLHostConfig>
<Certificate certificateKeyFile="${CERTIFICATE_KEY_FILE}"
certificateFile="${CERTIFICATE_FILE}"
certificateChainFile="${CERTIFICATE_CHAIN_FILE}"
type="RSA" />
</SSLHostConfig>
How to configure:
echo "org.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource" >> conf/catalina.properties
or add this to CATALINA_OPTS
-Dorg.apache.tomcat.util.digester.PROPERTY_SOURCE=org.apache.tomcat.util.digester.EnvironmentPropertySource
Note
When configured the PropertySource for resolving expressions from system properties is still active.
Digester, Tomcat Configuration Reference System Properties
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String | |
| public String | getProperty(String
The key of the requested property key, ClassLoader The class loader associated with the code that
trigger the property lookup classLoader)Implements org. Obtain a property value, checking that code associated with the provided class loader has permission to access the property. |
| EnvironmentPropertySource | back to summary |
|---|---|
| public EnvironmentPropertySource() | |
| getProperty | back to summary |
|---|---|
| public String getProperty(String key) Implements org.
| |
| getProperty | back to summary |
|---|---|
| public String getProperty(String key, ClassLoader classLoader) Implements org. Doc from org. Obtain a property value, checking that code associated with the
provided class loader has permission to access the property. If the
| |