How to change database settings for a deployed war

2020-04-30 02:06发布

We have a WAR file that is deployed however we want to change the database settings. How do I get about doing that? I opened the WAR file in an IDE and there are like 2-3 places that have the database settings. What is the proper way of changing it?

Thank You

2条回答
ゆ 、 Hurt°
2楼-- · 2020-04-30 02:27

The tomcat instance should be set up to provide a datasource through JNDI.

查看更多
等我变得足够好
3楼-- · 2020-04-30 02:28

The proper way is to use a datasource at the application level and to administer it at the application server level. Check the MySQL DBCP Example in the Tomcat documentation.

查看更多
登录 后发表回答