Github 操作 GAE 部署“没有找到任何带有 Main-Class 清单条目的 jar 文件”

问题描述 投票:0回答:0

我们正在使用谷歌应用引擎来部署我们的服务器。我们正在使用 github 操作来进行持续部署。手动部署它可以工作,并且身份验证步骤也可以远程工作,但是,它说“没有找到任何带有 Main-Class 清单条目的 jar 文件” 我对 github actions 和 google app engine 很陌生 log of the problem

添加入口点对操作有效,但服务器损坏并返回 500。这可能是因为当使用

mvn install
运行我们的 spring boot 应用程序时,它给了我们错误,但是当我们运行时,
mvn spring-boot:run
没有错误. enter image description here 这是代码块

package com.routezero.tracking.services.carbon;

import com.google.auth.oauth2.GoogleCredentials;
import com.google.firebase.FirebaseApp;
import com.google.firebase.FirebaseOptions;
import org.springframework.stereotype.Service;

import javax.annotation.PostConstruct;
import java.io.FileInputStream;

@Service
public class DBInitialiser {
    @PostConstruct
    public void initialize() {
        try {
            FileInputStream serviceAccount =
                    new FileInputStream("./travelcarbontracking-firebase.json");

            FirebaseOptions options = new FirebaseOptions.Builder()
                    .setCredentials(GoogleCredentials.fromStream(serviceAccount))
                    .setDatabaseUrl(".....")
                    .build();

            FirebaseApp.initializeApp(options);
        } catch (Exception e) {
            e.printStackTrace();
        }

    }


}
spring-boot google-app-engine google-cloud-platform firebase-realtime-database continuous-deployment
© www.soinside.com 2019 - 2024. All rights reserved.