How to pass System environment variable to a tomcat properties file?
I tried the following but it isn't working:
I tried add propertyConfigure
for servlet xml file
like below:
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="searchSystemEnvironment" value="true" />
<property name="systemPropertiesModeName" value="SYSTEM_PROPERTIES_MODE_OVERRIDE" />
</bean>
Modify dep.properties file like below:
serverUrl=https://${DOMAIN_NAME}
serverIP=1.1.1.1
and start tomcat with options CATALINA_OPTS="-DDOMAIN_NAME=example.com"
but when I try to browse the URL it ends up redirecting to https://${DOMAIN_NAME}
without expansion.
0 Answers