简体   繁体   English

Google App Engine + SpringBoot + Docker

[英]Google App Engine + SpringBoot + Docker

I'm trying to deploy my SpringBoot app using GAE. 我正在尝试使用GAE部署SpringBoot应用程序。

It works locally when mvn clean package exec:java But when I'm deploying it with mvn:appengine:deploy I'm getting this: mvn clean package exec:java时它在本地工作,但是当我使用mvn:appengine:deploy部署它时,我得到了这个:

Caused by: java.lang.IllegalArgumentException: No auto configuration classes 
found in META-INF/spring.factories. If you are using a custom packaging, make 
sure that file is correct.

Failed to execute goal com.google.cloud.tools:appengine-maven-
plugin:1.2.1:deploy (default-cli) on project boot: Execution default-cli of 
goal com.google.cloud.tools:appengine-maven-plugin:1.2.1:deploy failed: Non 
zero exit: 1

This is my pom.xml 这是我的pom.xml

<?xml version="1.0" encoding="UTF-8"?>

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

<groupId>org.springframework</groupId>
<artifactId>boot</artifactId>
<version>1.0</version>
<packaging>jar</packaging>
<name>Spring Boot Docker</name>
<description>Getting started with Spring Boot and Docker</description>

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.5.3.RELEASE</version>
    <relativePath />
</parent>

<properties>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.source>1.8</maven.compiler.source>
    <docker.image.prefix>adyzds</docker.image.prefix>
    <!-- <java.version>1.8</java.version> -->
    <appengine.maven.plugin>1.2.1</appengine.maven.plugin>
    <app.stage.artifact>${project.build.directory}/boot-1.0-jar-with-dependencies.jar</app.stage.artifact>
</properties>

<build>
    <plugins>

        <!-- // [START assembly] -->
        <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>single</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <archive>
                    <manifest>
                        <mainClass>hello.Application</mainClass>
                    </manifest>
                </archive>
            </configuration>
        </plugin>
        <!-- // [END assembly] -->

        <!-- // [START exec] -->
        <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <configuration>
                <mainClass>hello.Application</mainClass>
                <arguments>
                    <argument>-jar</argument>
                    <argument>${app.stage.stagingDirectory}/boot-1.0-jar-with-dependencies.jar</argument>
                </arguments>
            </configuration>
        </plugin>
        <!-- // [END exec] -->
        <plugin>
            <groupId>com.google.cloud.tools</groupId>
            <artifactId>appengine-maven-plugin</artifactId>
            <version>${appengine.maven.plugin}</version>
            <configuration>
            </configuration>
        </plugin>


    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-test</artifactId>
        <scope>test</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-simple</artifactId>
    </dependency>
    <dependency>
        <groupId>com.google.code.gson</groupId>
        <artifactId>gson</artifactId>
    </dependency>

    <dependency>
        <groupId>com.google.cloud</groupId>
        <artifactId>google-cloud-datastore</artifactId>
        <version>0.13.0-beta</version>
    </dependency>
</dependencies>

What could be the problem? 可能是什么问题呢?

我用springboot插件更改了程序集插件,现在好像可以了

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM