A convenient way to preload data in development environment datastore
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?
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
精彩评论