美文网首页
springboot打包成war详细步骤报错404成功解决

springboot打包成war详细步骤报错404成功解决

作者: 催化剂 | 来源:发表于2022-09-06 15:25 被阅读0次

    原文链接:https://blog.csdn.net/dongwhat/article/details/126004910

    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 http://maven.apache.org/xsd/maven-4.0.0.xsd">

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.glem.prj.nanjing</groupId>

    <artifactId>nanjing-data</artifactId>

    <version>1.0.0-SNAPSHOT</version>

    <packaging>war</packaging>

    <name>nanjing-data</name>

    <description>Demo project for Spring Boot</description>

    <parent>

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

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

    <version>1.5.10.RELEASE</version>

    <relativePath/> <!-- lookup parent from repository -->

    </parent>

    <properties>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

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

    </properties>

    <dependencies>

    <dependency>

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

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

    <exclusions>

    <exclusion>

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

    <artifactId>spring-boot-starter-tomcat</artifactId>

    </exclusion>

    </exclusions>

    </dependency>

    <dependency>

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

    <artifactId>spring-boot-starter-tomcat</artifactId>

    <scope>provided</scope>

    </dependency>

    <!--<dependency>

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

    <artifactId>spring-boot-starter-jdbc</artifactId>

    </dependency>-->

    <!-- <dependency>-->

    <!-- <groupId>org.mybatis.spring.boot</groupId>-->

    <!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->

    <!-- <version>1.3.2</version>-->

    <!-- </dependency>-->

    <!-- <dependency>-->

    <!-- <groupId>mysql</groupId>-->

    <!-- <artifactId>mysql-connector-java</artifactId>-->

    <!-- <scope>runtime</scope>-->

    <!-- </dependency>-->

    <dependency>

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

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

    <scope>test</scope>

    </dependency>

    <dependency>

    <groupId>org.apache.commons</groupId>

    <artifactId>commons-lang3</artifactId>

    <version>3.4</version>

    </dependency>

    <dependency>

    <groupId>com.fasterxml.jackson.core</groupId>

    <artifactId>jackson-core</artifactId>

    </dependency>

    <dependency>

    <groupId>com.fasterxml.jackson.core</groupId>

    <artifactId>jackson-databind</artifactId>

    </dependency>

    <dependency>

    <groupId>com.fasterxml.jackson.datatype</groupId>

    <artifactId>jackson-datatype-joda</artifactId>

    </dependency>

    <dependency>

    <groupId>com.fasterxml.jackson.module</groupId>

    <artifactId>jackson-module-parameter-names</artifactId>

    </dependency>

    <!--swagger-->

    <dependency>

    <groupId>io.springfox</groupId>

    <artifactId>springfox-swagger2</artifactId>

    <version>2.9.2</version>

    </dependency>

    <dependency>

    <groupId>io.springfox</groupId>

    <artifactId>springfox-swagger-ui</artifactId>

    <version>2.9.2</version>

    </dependency>

    <!--redis-->

    <!--<dependency>

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

    <artifactId>spring-boot-starter-data-redis</artifactId>

    </dependency>

    <dependency>

    <groupId>redis.clients</groupId>

    <artifactId>jedis</artifactId>

    <version>2.9.0</version>

    </dependency>-->

    <dependency>

    <groupId>org.apache.commons</groupId>

    <artifactId>commons-pool2</artifactId>

    <version>2.4.2</version>

    </dependency>

    <dependency>

    <groupId>junit</groupId>

    <artifactId>junit</artifactId>

    <version>4.12</version>

    </dependency>

    <!-- lombok -->

    <dependency>

    <groupId>org.projectlombok</groupId>

    <artifactId>lombok</artifactId>

    <version>1.16.4</version>

    </dependency>

    <!-- alibaba的druid数据库连接池 -->

    <!--<dependency>

    <groupId>com.alibaba</groupId>

    <artifactId>druid-spring-boot-starter</artifactId>

    <version>1.1.9</version>

    </dependency>-->

    <!-- Sqlserver 驱动 -->

    <!-- <dependency>-->

    <!-- <groupId>net.sourceforge.jtds</groupId>-->

    <!-- <artifactId>jtds</artifactId>-->

    <!-- </dependency>-->

    <dependency>

    <groupId>commons-collections</groupId>

    <artifactId>commons-collections</artifactId>

    <version>3.2.1</version>

    </dependency>

    <dependency>

    <groupId>org.apache.axis</groupId>

    <artifactId>axis</artifactId>

    <version>1.4</version>

    </dependency>

    <dependency>

    <groupId>org.apache.axis</groupId>

    <artifactId>axis-jaxrpc</artifactId>

    <version>1.4</version>

    </dependency>

    <dependency>

    <groupId>commons-discovery</groupId>

    <artifactId>commons-discovery</artifactId>

    <version>0.5</version>

    </dependency>

    <dependency>

    <groupId>wsdl4j</groupId>

    <artifactId>wsdl4j</artifactId>

    <version>1.6.3</version>

    </dependency>

    <dependency>

    <groupId>dom4j</groupId>

    <artifactId>dom4j</artifactId>

    <version>1.6.1</version>

    </dependency>

    </dependencies>

    <build>

    <plugins>

    <plugin>

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

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

    </plugin>

    <plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-clean-plugin</artifactId>

    <version>2.5</version>

    </plugin>

    <plugin>

    <groupId>org.apache.maven.plugins</groupId>

    <artifactId>maven-resources-plugin</artifactId>

    <version>2.6</version>

    </plugin>

    </plugins>

    </build>

    </project>

    相关文章

      网友评论

          本文标题:springboot打包成war详细步骤报错404成功解决

          本文链接:https://www.haomeiwen.com/subject/pqwinrtx.html