Appengine local datastore location config for Java

2019-02-20 00:03发布

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

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

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?

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

1条回答
beautiful°
2楼-- · 2019-02-20 00:13

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>

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>

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

查看更多
登录 后发表回答