How to dynamically load jdbc.properties
PHPz
PHPz 2017-05-17 10:07:55
0
2
729

Because I want to distinguish the username and password of the database in development, test, and production environments, is there a way to dynamically read the specified jdbc configuration file, such as jdbc_dev.properties, jdbc_test.properties, etc.

目前项目的common.properties中有设置运行环境参数。
#开发环境环境标记dev/product/test
development_environment=product
请问这种处理的思路是什么,多谢了!

I don’t know if this idea is correct, I hope an experienced driver can give me some advice.

PHPz
PHPz

学习是最好的投资!

reply all(2)
过去多啦不再A梦

mvn profile

淡淡烟草味

If you use Spring, you can use Spring’s Profile

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!