I am trying to set up the database connection properties using JNDI for a Spring web application.
I am considering two approaches as below:
Approach
You also can use JNDI URL support for different application configuration for test, integration test, production.
... ...
Check out the GitHub project Tomcat JNDI URL Support to enable JNDI URL support for Tomcat servers.