Azure无法部署:主机名myapp.azurewebsites.net无效

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

我正在尝试将springboot应用程序部署到Azure应用程序服务。并收到错误:com.microsoft.azure.CloudException:主机名my_app.azurewebsites.net无效。 。 。 。引起:rx.exceptions.OnErrorThrowable $ OnNextValue:发出onNext值时出现OnError:retrofit2.Response.class

我模仿了这里所示的步骤:https://docs.microsoft.com/en-us/java/azure/spring-framework/deploy-spring-boot-java-app-with-maven-plugin?view=azure-java-stable

我已安装Azure CLI并使用公钥进行连接。我在下面添加了部分pom.xml,我添加了插件

 <plugin>
                <groupId>com.microsoft.azure</groupId>
                <artifactId>azure-webapp-maven-plugin</artifactId>
                <version>1.4.0</version>
                <configuration>
                    <deploymentType>jar</deploymentType>
                <!-- configure app to run on port 80, required by App Service -->
                <appSettings>
                    <property>
                        <name>JAVA_OPTS</name>
                        <value>-Dserver.port=80</value>
                    </property>
                </appSettings>

                <!-- Web App information -->
                <resourceGroup>my_group</resourceGroup>
                <appName>my_app</appName>
                <region>East US</region>

                <!-- Java Runtime Stack for Web App on Linux-->
                <linuxRuntime>jre8</linuxRuntime>
            </configuration>
            <dependencies>
                <dependency>
                    <groupId>javax.xml.bind</groupId>
                    <artifactId>jaxb-api</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-core</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>com.sun.xml.bind</groupId>
                    <artifactId>jaxb-impl</artifactId>
                    <version>2.2.11</version>
                </dependency>
                <dependency>
                    <groupId>javax.activation</groupId>
                    <artifactId>activation</artifactId>
                    <version>1.1.1</version>
                </dependency>
            </dependencies>
        </plugin>
azure spring-boot cloud
2个回答
1
投票

登录Azure门户并启动向导以创建新的Web应用程序以查找可接受的应用程序名称,然后更新部署配置,然后重试。

portal


3
投票

appName值必须是唯一的,并且不得包含任何无效字符,如下划线。

© www.soinside.com 2019 - 2024. All rights reserved.