首先如果是你部署的项目没有问题的话 调试访问可以正常访问的话 那么我这篇文章能帮到你  尤其是第一次部署项目的新手

http://localhost:8080/adinfo/index我的访问地址是这样的在项目里当打成war  必须使用项目名了 但是 这里就得注意 了 

springboot项目打完war包部署到tomcat报404

对比下 这里的名字 就是项目名字然后访问地址 就成了 http://localhost:8080/testtool/adinfo/index

有的打包时候没有指定打包的项目名字的话就是testtool0.0.1-SNAPSHO这样的   想修改成自己定义的项目的名字的话

<build>
    <!-- 修改war包名称    改成 你自己想要的项目的名字即可  访问路径就成了 http://localhost:8080/testtool/adinfo/index  - ->
    <finalName>testtool</finalName>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.mybatis.generator</groupId>
            <artifactId>mybatis-generator-maven-plugin</artifactId>
            <version>1.3.2</version>
            <configuration>
                <verbose>true</verbose>
                <overwrite>true</overwrite>
            </configuration>
        </plugin>
    </plugins>
</build>
 

相关文章:

  • 2021-08-05
  • 2021-09-30
  • 2021-11-23
  • 2021-12-30
  • 2021-06-18
  • 2022-01-16
  • 2021-05-11
猜你喜欢
  • 2021-11-18
  • 2021-06-22
  • 2021-04-29
  • 2022-01-14
  • 2019-01-06
  • 2021-06-24
  • 2021-04-16
相关资源
相似解决方案