I have a context.xml where I am connecting to DB.
<?xml version='1.0' encoding='utf-8'?>
<Context>
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<Resource name="jdbc/SS"
auth="Container"
type="javax.sql.DataSource"
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
username="a***b"
password="C********1"
driverClassName="org.postgresql.Driver"
url="jdbc:postgresql://**********:****/a***b"
maxActive="100"
maxIdle="50"
minIdle="10"
testWhileIdle="true"
maxWait="30000"
maxAge="60000"
removeAbandoned="true"
removeAbandonedTimeout="600" />
</Context>
I need to get the DB credentials from the secret manager and pass the values into the context.xml by replacing the hardcoded DB credentials.
Is there any way to achieve this?