跟踪 Java 应用程序中的特定请求和响应参数 [英] tracking specific request and response parameters in java application

查看:37
本文介绍了跟踪 Java 应用程序中的特定请求和响应参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试跟踪我的请求和响应对象的特定参数,然后为另一个报告检索它.例如,如果我有一个 person 对象作为请求对象,我只想跟踪它的名字和家庭,而不是年龄.我知道 Spring Actuator,但我想要一个框架或最佳实践来实现或在我的项目.为此目的,Java 中是否有任何最佳实践或框架?我试图搜索这个,但我得到的只是监控应用程序重要指标的最佳实践.

I'm trying to get track of specific parameters of my request and response object and then retrieve it for another report. for example if i have a person object as request object i want to get track of only it's name and family and not the age.I'm aware of Spring Actuator, but i want a framework or best practice to implement or use it in my project. is there any best practice or framework in java for this purpose? i tried to search this but all i get is best practices for monitoring important metrics of application.

推荐答案

您可以使用过滤器来跟踪请求和响应.示例可在 Spring Boot 过滤器示例

You can use filters to track request and response. Example is available at Spring Boot Filter example

这篇关于跟踪 Java 应用程序中的特定请求和响应参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆