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.
mvn profile
If you use Spring, you can use Spring’s Profile