簡體   English   中英

Appengine雲端點v2:在devserver中指定數據存儲區

[英]Appengine cloud endpoints v2: specify datastore in devserver

我根據git repo( https://github.com/GoogleCloudPlatform/java-docs-samples/tree/master/appengine/endpoints-frameworks-v2 )上的遷移文檔和v2示例遷移到了雲端點v2。 但是,我不確定如何設置jvmFlag來指定其他屬性,例如backend_store,端口,啟用調試等,就像在v1中一樣。

這是我pom.xml中的build標記。

<build>
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
    <plugins>
        <!-- <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId>
            <version>2.1</version> <executions> <execution> <phase>compile</phase> <goals>
            <goal>display-dependency-updates</goal> <goal>display-plugin-updates</goal>
            </goals> </execution> </executions> </plugin> -->
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>1.3.1</version>
            <configuration>
                <devserver.storagePath>/Users/user/Documents/development/health/local_db.bin</devserver.storagePath>
            </configuration>
        </plugin>
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>endpoints-framework-maven-plugin</artifactId>
            <version>1.0.0</version>
            <configuration>
                <!-- plugin configuration -->
                <hostname>amplified-lamp-688.appspot.com</hostname>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <version>3.6.2</version>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.8</source>
                <target>1.8</target>
            </configuration>
        </plugin>

        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <version>2.4</version>
            <configuration>
                <!--<enableJarClasses>false</enableJarClasses>-->
                <!--&lt;!&ndash; Comment in the below snippet to bind to all IPs instead of just-->
                    <!--localhost &ndash;&gt;-->
                <!--&lt;!&ndash; address>0.0.0.0</address> &ndash;&gt;-->
                <!--<port>8080</port>-->
                <!--&lt;!&ndash; Comment in the below snippet to enable local debugging with a remove-->
                    <!--debugger like those included with Eclipse or IntelliJ &ndash;&gt;-->
                <!--<jvmFlags>-->
                    <!--<jvmFlag>-Xdebug</jvmFlag>-->
                    <!--<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>-->
                    <!--<jvmFlag>-Ddatastore.backing_store=/Users/user/Documents/development/health/local_db.bin</jvmFlag>-->
                    <!--<jvmFlag>-Ddatastore.default_high_rep_job_policy_unapplied_job_pct=10</jvmFlag>-->
                <!--</jvmFlags>-->
            </configuration>
            <executions>
                <execution>
                    <phase>compile</phase>
                    <goals>
                        <goal>display-dependency-updates</goal>
                        <goal>display-plugin-updates</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
    </plugins>
</build>

請幫助配置jvmFlags。

這是指定jvmFlags的解決方案之一

        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>1.3.1</version>
            <configuration>
                <!--<devserver.storagePath>/Users/user/Documents/development/health/local_db.bin</devserver.storagePath>-->
                <devserver:port>8181</devserver:port>
                <devserver.jvmFlags>-Xdebug</devserver.jvmFlags>
                <devserver.jvmFlags>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</devserver.jvmFlags>
                <devserver.jvmFlags>-Ddatastore.backing_store=/Users/user/Documents/development/health/local_db.bin</devserver.jvmFlags>
            </configuration>
        </plugin>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM