I guess it cannot be done because the Spring JPA needs the jdbc details to build a Hibernate entity manager at spring context init time.
My workaround: re-write the jdbc.properties file in the class path every time the app starts up, using connecting details copied from a remote property (xml) file which is user configurable.
The 1st time the app starts, it can connect to an embedded demo db, have the db connect details configured by a install-wizard, then restart and connect to the production db.
I would have liked to have the app start with no db connection, but it doesn't seem possible with spring jpa + hibernate, where I have the datasource & entity mgr configured in xml.
|