如何查看Tomcat和Spring的网络流量

huangapple go评论76阅读模式
英文:

how to view network traffic for tomcat and spring

问题

使用Spring 2.0.3
我想知道如何配置Tomcat以查看网络流量。我已经查看了记录所有网络流量

但那里的解决方案需要大量编码,我想避免。我正在寻找一些设置,可以输出发送到网络的内容。

英文:

Using Spring 2.0.3
I would like to know how to configure tomcat so as to view the network traffic. I have looked at Logging all network traffic

but the solution there requires much coding would like to avoid. I am looking for some setting which would output what is sent over the wire.

答案1

得分: 1

那通常不被视为网络流量。这些解决方案用于拦截Spring MVC的HTTP流量所使用的Java流。您提到使用Spring,但并没有明确提到Spring MVC。无论如何,要在不编写任何代码的情况下捕获网络流量,您可以使用数据包捕获工具,比如Wireshark。请注意,您无法直接解密HTTPS。它需要一些额外的配置和访问密钥

另一种HTTP流量的选项是启用Java SSL调试日志。它可能会非常冗长,但您无需采取额外步骤或学习新工具。

英文:

That's not what usually is considered network traffic. Those solutions are to intercept the Java stream used for the HTTP traffic of Spring MVC. You mention using Spring but not Spring MVC explicitly. In any case to capture network traffic without any coding you could use a packet capture tool, like Wireshark. Note that you will not be able to decrypt HTTPS out of the box. It requires some extra configurations and access to secret keys.

Another option for HTTP traffic is to enable Java SSL debug log. It can be very verbose but you don't need extra steps or learn a new tool.

huangapple
  • 本文由 发表于 2023年5月11日 19:24:29
  • 转载请务必保留本文链接:https://go.coder-hub.com/76227093.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定