A convenient way to preload data in development environment datastore

為{幸葍}努か 提交于 2020-01-01 19:58:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!