在开发环境数据存储中预加载数据的便捷方式 [英] A convenient way to preload data in development environment datastore
问题描述
我正在使用Maven在Google App Engine上开发应用程序。当我运行本地服务器时,我希望在数据存储中预先加载一些数据,例如本地用户表。服务器将数据存储文件放在目标目录的WEB-INF / appengine生成的目录下,并在每次构建之前清除。
有没有一种方便的方法来做到这一点?
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?
推荐答案
您有几个选择:
a。备份并在您的构建步骤中重新加载 local_db.bin
b。使用 datastore.backing_store
系统属性:
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
这篇关于在开发环境数据存储中预加载数据的便捷方式的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!