C-Otto / lnd-manageJ

MIT License
52 stars 11 forks source link

spring.datasource.url -> lnd-manageJ.conf #28

Open netcoding opened 2 years ago

netcoding commented 2 years ago

postgres url is hardcoded as localhost in application/src/main/resources/application.properties

i use the same postgres-db on another host while i still use the lnd-manageJ locally on my laptop for testing.

after every git checkout my application.properties is overwritten again.

i wish that "spring.datasource.url" is configured via "lnd-manageJ.conf".

C-Otto commented 2 years ago

Maybe this helps as a quick fix?

echo "spring.datasource.url=xxx" >> /tmp/override.properties
java -jar application/build/libs/application-boot.jar --spring.config.location=classpath:application.properties,/tmp/override.properties
martinatime commented 2 years ago

As the application is using the default profile you can also create an application-default.properties and set the values in there. This will override whatever is in application.properties and won't be updated by Git Pulls unless the repo creates an application-default.properties.