spring boot + jar打包部署tomcat 解决spring boot + jar打包部署tomcat 404错误问题

软件发布|下载排行|最新软件

当前位置:首页IT学院IT技术

spring boot + jar打包部署tomcat 解决spring boot + jar打包部署tomcat 404错误问题

Z-elephant   2021-01-28 我要评论

1.spring boot 不支持jsp打jar包,jsp只能打war包.
方法:

<packaging>war</packaging>

<build>
 	<plugins>
 		<plugin>
 			<groupId>org.springframework.boot</groupId>
 			<artifactId>spring-boot-maven-plugin</artifactId>
 		</plugin>
 	</plugins>
</build>

2.tomcat版本不能太新,太新容易不稳定,选用tomcat10时成功404,换成tomcat9就正常了.

部署到tomcat10时一直没出现spring字样

部署到tomcat10时一直没出现spring字样

换成tomcat9立即能看到变化

在这里插入图片描述

成功部署

在这里插入图片描述

Copyright 2022 版权所有 软件发布 访问手机版

声明:所有软件和文章来自软件开发商或者作者 如有异议 请与本站联系 联系我们