问题
I'm developing an application on Google App Engine using Maven. When I run the local server I would like to have some data preloaded in the datastore, such as the local user table. The server puts the datastore file under the WEB-INF/appengine-generated of the target directory and it is cleaned before every build. Is there a convenient way to do so?
回答1:
You have a couple of options:
a. backup and reload local_db.bin
in your build steps
b. use the datastore.backing_store
system property with:
dev_appserver.sh --jvm_flag= -Ddatastore.backing_store=\path\to\local_db.bin
来源:https://stackoverflow.com/questions/4945468/a-convenient-way-to-preload-data-in-development-environment-datastore