12

# 记一次Tomcat升级——幽灵猫

 4 years ago
source link: http://www.cnblogs.com/hasz/p/12442277.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

一、背景

近日Tomcat被爆出幽灵猫漏洞,覆盖的版本从6-9全部中招,因此升级是当前能做的手段,那么就来说一下SpringBoot内置的Tomcat如何升级。

二、升级过程

1 下载对应的版本

这里由7,8,9三个版本,10是测试版,对于追求稳定的还是在以上三个版本里面选吧。低于7的需要自动升级,可能还需要修改代码。

我在这里选的是9.0.31

J7ZRbim.png!web
  1. 下载EMbedded即可
  2. 解压缩
    MZnuYrz.png!web
  3. 打开maven所在的.m2文件夹下repository目录
  4. 找到tomcat文件夹,新建一个9.0.31目录以及core,el,websock三个子目录,将压缩包里三个带有这个字符的对应的jar包放到文件夹下面
  5. 打开eclipse或者IDEA里面的项目找到你的POM文件
  6. 在 属性下面新建<tomcat.version>9.0.31</tomcat.version>
  7. 这时候在IDEA里别忘记了对Maven进行Reimport。
  8. 启动项目,就会看到你的apache/tomcat变成了9.0.31

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK