第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

帶有 Azure 應(yīng)用服務(wù)的 Spring Boot 應(yīng)用端點(diǎn)

帶有 Azure 應(yīng)用服務(wù)的 Spring Boot 應(yīng)用端點(diǎn)

函數(shù)式編程 2023-08-09 16:26:01
我正在嘗試將簡(jiǎn)單的 Spring Boot 應(yīng)用程序部署到 Azure 應(yīng)用程序服務(wù),但看起來(lái)應(yīng)用程序無(wú)法啟動(dòng)。我的應(yīng)用程序有休息端點(diǎn)@RequestMapping("/")public String index() {    return "Greetings from Spring Boot!";}我嘗試使用 azure-webapp-maven-plugin 進(jìn)行部署,pom 中的配置如下所示  <plugin>            <groupId>com.microsoft.azure</groupId>            <artifactId>azure-webapp-maven-plugin</artifactId>            <version>1.7.0</version>            <configuration>                <schemaVersion>V2</schemaVersion>                <!-- Web App information -->                <resourceGroup>${resourceGroup}</resourceGroup>                <appName>boot-test-app</appName>                <region>westeurope</region>                <pricingTier>P1V2</pricingTier>                <runtime>                    <os>linux</os>                    <javaVersion>jre8</javaVersion>                    <webContainer>tomcat 8.5</webContainer>                </runtime>                <appSettings>                    <property>                         <name>PORT</name>                        <value>80</value>                    </property>                    <property>                        <name>JAVA_OPTS</name>                        <value>-Xmx512m -Xms512m</value>                    </property>                </appSettings>                <deployment>                    <resources>                        <resource>                            <directory>${project.basedir}/target</directory>                            <!--<targetPath>/home/site/wwwroot/webapps/ROOT/</targetPath>-->                            <includes>                                <include>*.war</include>                            </includes>                        </resource>                    </resources>                </deployment>            </configuration>        </plugin>插件說部署成功,但是當(dāng)我打開應(yīng)用程序網(wǎng)頁(yè)時(shí) - 我收到 404 錯(cuò)誤。如果我使用適用于 Intellij Idea 的 Azure 插件進(jìn)行部署,情況也是如此。我缺少什么?謝謝!
查看完整描述

1 回答

?
慕慕森

TA貢獻(xiàn)1856條經(jīng)驗(yàn) 獲得超17個(gè)贊

您可以使用我的 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 https://maven.apache.org/xsd/maven-4.0.0.xsd">??

? <modelVersion>4.0.0</modelVersion>??

? <groupId>org.springframework</groupId>??

? <artifactId>gs-spring-boot</artifactId>??

? <version>0.1.0</version>??

? <parent>?

? ? <groupId>org.springframework.boot</groupId>??

? ? <artifactId>spring-boot-starter-parent</artifactId>??

? ? <version>2.1.6.RELEASE</version>?

? </parent>??

? <dependencies>?

? ? <dependency>?

? ? ? <groupId>org.springframework.boot</groupId>??

? ? ? <artifactId>spring-boot-starter-web</artifactId>?

? ? </dependency>??

? ? <!-- tag::actuator[] -->??

? ? <dependency>?

? ? ? <groupId>org.springframework.boot</groupId>??

? ? ? <artifactId>spring-boot-starter-actuator</artifactId>?

? ? </dependency>??

? ? <!-- end::actuator[] -->??

? ? <!-- tag::tests[] -->??

? ? <dependency>?

? ? ? <groupId>org.springframework.boot</groupId>??

? ? ? <artifactId>spring-boot-starter-test</artifactId>??

? ? ? <scope>test</scope>?

? ? </dependency>??

? ? <!-- end::tests[] -->?

? </dependencies>??

? <properties>?

? ? <java.version>1.8</java.version>?

? </properties>??

? <build>?

? ? <plugins>?

? ? ? <plugin>?

? ? ? ? <groupId>org.springframework.boot</groupId>??

? ? ? ? <artifactId>spring-boot-maven-plugin</artifactId>?

? ? ? </plugin>??

? ? ? <plugin>?

? ? ? ? <groupId>com.microsoft.azure</groupId>??

? ? ? ? <artifactId>azure-webapp-maven-plugin</artifactId>??

? ? ? ? <version>1.6.0</version>??

? ? ? ? <configuration>

? ? ? ? ? <schemaVersion>V2</schemaVersion>

? ? ? ? ? <resourceGroup>group name</resourceGroup>

? ? ? ? ? <appName>app name</appName>

? ? ? ? ? <region>westeurope</region>

? ? ? ? ? <pricingTier>P1V2</pricingTier>



? ? ? ? ? <!-- Begin of App Settings? -->

? ? ? ? ? <appSettings>

? ? ? ? ? ? ?<property>

? ? ? ? ? ? ? ? ? ?<name>JAVA_OPTS</name>

? ? ? ? ? ? ? ? ? ?<value>-Dserver.port=80</value>

? ? ? ? ? ? ?</property>

? ? ? ? ? </appSettings>


? ? ? ? ? <runtime>

? ? ? ? ? ? <os>linux</os>

? ? ? ? ? ? <javaVersion>jre8</javaVersion>

? ? ? ? ? ? <webContainer>jre8</webContainer>

? ? ? ? ? </runtime>

? ? ? ? ? <deployment>

? ? ? ? ? ? <resources>

? ? ? ? ? ? ? <resource>

? ? ? ? ? ? ? ? <directory>${project.basedir}/target</directory>

? ? ? ? ? ? ? ? <includes>

? ? ? ? ? ? ? ? ? <include>*.jar</include>

? ? ? ? ? ? ? ? </includes>

? ? ? ? ? ? ? </resource>

? ? ? ? ? ? </resources>

? ? ? ? ? </deployment>

? ? ? ? </configuration>

? ? ? </plugin>??

? ? ? <plugin>?

? ? ? ? <artifactId>maven-failsafe-plugin</artifactId>??

? ? ? ? <executions>?

? ? ? ? ? <execution>?

? ? ? ? ? ? <goals>?

? ? ? ? ? ? ? <goal>integration-test</goal>??

? ? ? ? ? ? ? <goal>verify</goal>?

? ? ? ? ? ? </goals>?

? ? ? ? ? </execution>?

? ? ? ? </executions>?

? ? ? </plugin>?

? ? </plugins>?

? </build>?

</project>

部署后,如果網(wǎng)頁(yè)仍然沒有顯示正確的頁(yè)面,請(qǐng)檢查運(yùn)行時(shí)堆棧是否與您在 pom.xml 中定義的相同。


查看完整回答
反對(duì) 回復(fù) 2023-08-09
  • 1 回答
  • 0 關(guān)注
  • 153 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)