本地计算机上的自定义数据存储位置使用App Engine [英] Custom datastore location on local machine with App Engine

查看:119
本文介绍了本地计算机上的自定义数据存储位置使用App Engine的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在开发Android的工作室App Engine的应用程序,并在我的本地机器上测试它(与本地数据存储)。它是基于Java的应用程序。每当我重新运行的本地数据存储被清除的服务器。我已经发现了几个解决方案 Python的的开发,但它看起来像有没有答案的Java。

I'm developing App Engine application in Android Studio and testing it on my local machine (with local datastore). It's Java based app. Every time I re-run the server the local datastore is cleared. I've found several solutions for Python developers but it looks like there's no answer for Java.

Android的工作室只允许改变:

Android Studio allows only to change:

  • WAR路径
  • VM参数数量
  • 服务器地址
  • 服务器端口

我试着VM的args,但这些都是Java虚拟机没有为应用服务器明显。有没有一种方法,以在服务器重新启动持续本地数据存储?这将是完美的,如果我可以从Android的工作室直接运行这个配置。

I've tried with VM args but these are for Java VM not for the app server obviously. Is there a way to persist local datastore across server restarts? It would be perfect If I could run this configuration directly from Android Studio.

推荐答案

本地数据存储被清除,因为它是在默认情况下位于应用程序展开的战争目录(被全部删除每个版本)。

The local datastore gets cleared because it is by default located in the application exploded war directory (which is deleted in its entirety on every build).

而不必运行开发服务器手动形成一个终端,可以真正地ARG添加一个虚拟机的应用程序引擎运行配置定位在另一个位置的数据存储:

Instead of having to running the dev server manually form a terminal, you can actually just add a VM arg to the appengine run configuration to locate the datastore in another location:

-Ddatastore.backing_store="/path/to/datastore/file/location/local_db.bin"

(解决方案发现:<一href="https://$c$c.google.com/p/android/issues/detail?id=68225">https://$c$c.google.com/p/android/issues/detail?id=68225)

这篇关于本地计算机上的自定义数据存储位置使用App Engine的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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