如何用Java编写审计方法?

发布于 2024-08-10 13:08:31 字数 76 浏览 2 评论 0原文

随着我的 java 应用程序复杂性的增加,我想编写审核方法以确保我做正确的事情。

我怎样才能在java中做到这一点? 谢谢

As my java application increases in complexity i want to write audit methods to make sure that i am doing the right thing.

How can i do it in java?
thx

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

陌路终见情 2024-08-17 13:08:32

或者也许使用 AspectJ 来审核某些方法调用?

您可以创建类似于过滤器的切入点,并在调用某些方法时捕获并获取有关参数的信息。这可能有利于审计。

方面 J

Or perhaps using AspectJ to audit certain method calls?

You can make pointcuts which are like filters and catch when certain methods are called and get information about the parameters. This could be good for auditing.

Aspect J

酒中人 2024-08-17 13:08:31

他可能意味着单元测试

检查此内容以开始: http://junit.sourceforge.net/

he probably means unit tests

check this to get started: http://junit.sourceforge.net/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文