I am trying to edit application.properties
from code. I need to change datasource.url
in code. Can I somehow pass a value to application.properties
?
Asked
Active
Viewed 183 times
0
-
Why would you want to do that? That is not what the properties data is there for. Build some custom logic and persistence for that kind of behaviour. – luk2302 May 26 '17 at 12:01
-
I need to upload Postgres database from SQLite.All SQLite databases doesn't have same name i need to edit datasource.url. I dont know how to pass value in DataSource in my datasource bean.. – Triso May 26 '17 at 12:11
-
you should create multiple data sources instead – StanislavL May 26 '17 at 12:24
-
Have a look here for an implemantation https://stackoverflow.com/questions/39357367/change-database-schema-during-runtime-based-on-logged-in-user – baao May 28 '17 at 15:04