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 中定義的相同。
添加回答
舉報(bào)