In jmix app, in application.properties config file I have this 2 blocks
1 for test and dev purposes
main.datasource.jdbcUrl = jdbc:postgresql://srv/mydatabase
main.datasource.username = postgres
main.datasource.password =123
2 and this for production
#main.datasource.jdbcUrl = jdbc:postgresql://localhost/mydatabase
#main.datasource.username = postgres
#main.datasource.password =mypass
When I make war file I decomment block 2 and comment block 1 to have the proper connection params.
Is there a solution to have 2 application.properties files and tell the graddle when making war file to choose the one for production ? Or how i should do it right ?
Thanks.