【问题标题】:GAE error generating the API metadata for Cloud Endpoints from Spring project从 Spring 项目生成 Cloud Endpoints 的 API 元数据的 GAE 错误
【发布时间】:2015-06-22 03:56:06
【问题描述】:

我有一个带有 maven 的 spring boot 项目,我想在 google appengine 中运行它。现在我不断收到此错误:

为您的云生成 API 元数据时出现问题 端点类:找不到 WEB-INF 目录

但是 web-inf 目录就在那里,项目工作正常!!

我将 STS 3.6.3 与 maven 和 google app engine sdk 1.9.19 一起使用。

如何追踪此错误?我可以查看详细的错误日志吗?任何想法表示赞赏....

【问题讨论】:

    标签: spring maven google-app-engine spring-mvc


    【解决方案1】:

    我认为是eclipse插件相关的bug,检查一下.classpath

    <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
        <attributes>
            <attribute name="maven.pomderived" value="true"/>
            <attribute name="org.eclipse.jst.component.dependency" value="/war/WEB-INF/lib"/>
        </attributes>
    </classpathentry>
    

    确保您的 WEB-INF 路径值正确。我的是“/WEB-INF/lib”,生成不正确。


    2015 年 12 月 14 日更新:

    实际上,我的环境从现在开始就不必编辑它了:
    日食:Luna 4.4.2
    Eclipse 4.4 的 Google 插件:3.8.0
    Google App Engine Maven 集成:3.8.0
    Google App Engine Java SDK:1.9.25

    我的整个.classpath

    <?xml version="1.0" encoding="UTF-8"?>
    <classpath>
        <classpathentry including="**/*.java" kind="src" output="war/WEB-INF/classes" path="src">
            <attributes>
                <attribute name="optional" value="true"/>
                <attribute name="maven.pomderived" value="true"/>
            </attributes>
        </classpathentry>
        <classpathentry kind="src" output="target/test-classes" path="test">
            <attributes>
                <attribute name="optional" value="true"/>
                <attribute name="maven.pomderived" value="true"/>
            </attributes>
        </classpathentry>
        <classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
            <attributes>
                <attribute name="maven.pomderived" value="true"/>
            </attributes>
        </classpathentry>
        <classpathentry kind="con" path="com.google.appengine.eclipse.core.GAE_CONTAINER"/>
        <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
            <attributes>
                <attribute name="maven.pomderived" value="true"/>
                <attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/>
            </attributes>
        </classpathentry>
        <classpathentry kind="output" path="war/WEB-INF/classes"/>
    </classpath>
    

    【讨论】:

    • 谢谢这是正确的,但是每次更新 maven 项目时它都会再次生成错误。我正在尝试找到解决方法,但还没有。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-05-03
    • 2016-03-21
    • 2014-06-28
    • 2014-07-27
    • 2013-03-01
    相关资源
    最近更新 更多