我有一個簡單的 sparkJava 端點,我正在嘗試在 Heroku 上部署它,但出現以下錯誤。
無法部署應用程式:“spark-heroku-example”權限不足狀態碼:403 responseBody:{“id”:“forbidden”,“message”:“您無權訪問應用程式 spark-heroku-example。”}
這是我的行家:
<?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.haseeb</groupId>
<artifactId>reactive-multi</artifactId>
<version>1.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>com.twilio.sdk</groupId>
<artifactId>twilio</artifactId>
<version>8.26.0</version>
</dependency>
<dependency>
<groupId>com.sparkjava</groupId>
<artifactId>spark-core</artifactId>
<version>2.9.3</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<descriptorRefs>
<!-- This tells Maven to include all dependencies -->
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>Main</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
<plugin>
<groupId>com.heroku.sdk</groupId>
<artifactId>heroku-maven-plugin</artifactId>
<version>2.0.3</version>
<configuration>
<jdkVersion>1.8</jdkVersion>
<appName>spark-heroku-example</appName>
<processTypes>
<!-- Tell Heroku how to launch your application -->
<web>java -jar ./target/my-app-1.0-jar-with-dependencies.jar</web>
</processTypes>
</configuration>
</plugin>
</plugins>
</build>
</project>
uj5u.com熱心網友回復:
你pom.xml的無關緊要。此錯誤與您嘗試部署的代碼無關。
您無權訪問應用程式 spark-heroku-example。
您正在嘗試部署到 Heroku 應用程式spark-heroku-example。你擁有那個應用程式嗎?是你創建的,還是被邀請為它做出貢獻?可能不是。
我猜您正在學習本教程,但錯過或誤讀了此步驟:
heroku create spark-heroku-example #choose your own application name
作者選擇并注冊了這個名字spark-heroku-example。您需要選擇另一個名稱(或者您可以讓 Heroku 為您選擇一個名稱,只需運行heroku create而無需任何引數)。
確保在作者在教程中使用的所有地方都使用您的應用程式名稱。spark-heroku-example
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/441913.html
