Java DevServer的Appengine本地数据存储位置配置 [英] Appengine local datastore location config for Java DevServer

查看:184
本文介绍了Java DevServer的Appengine本地数据存储位置配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在当前的Appengine java文档中找不到任何关于本地数据存储位置配置参数的提及。

I couldn't find any mention of local datastore location config param in current Appengine java documentation.

我记得几年前有这个键: -Ddatastore.backing_store 。但是在当前文档中没有提到这一点。

I remember some years ago there was this key: -Ddatastore.backing_store. However nothing is mentioned about this in current documentation.

只有一些旧博客提到它: http://turbomanage.wordpress.com/2011/06/25/preserving-the-datastore-in-gae-dev -mode /

Onlysome old blogs mentioned it : http://turbomanage.wordpress.com/2011/06/25/preserving-the-datastore-in-gae-dev-mode/

最新情况是什么?该配置是否已被弃用?

What is the latest situation ? Has this config been deprecated?

目前的方法是什么?
人们使用Maven,以防止每次重建时数据存储区清理?

What is the current way to do that? What people use with Maven, to prevent datastore cleanup on each rebuild?

推荐答案

文档中没有提到但是它仍然有效。

It's not mentioned in the documentation but it still works.

<plugin>
     <groupId>com.google.appengine</groupId>
     <artifactId>appengine-maven-plugin</artifactId>
     <version>${appengine.target.version}</version>
     <configuration>
                <jvmFlags>
                    <jvmFlag>-Ddatastore.backing_store=c:/temp/ds-maven.bin
                    </jvmFlag>
                </jvmFlags>
     </configuration>
</plugin>

如果要在不使用maven的情况下修改商店位置,可以在命令行中指定它像这样的开发服务器:

If you want to modify the store location without using maven, you can specify it in the command line of the dev server like this :

 dev_appserver --property=datastore.backing_store=c:/temp/ds.bin <app directory>

但要小心,因为它们没有记录功能,Google可能会决定在没有警告的情况下将其删除。

Be careful though, since they are not documented features, Google might decide to remove them without warning.

这篇关于Java DevServer的Appengine本地数据存储位置配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆