开发者

How to write Audit methods in Java? [closed]

开发者 https://www.devze.com 2022-12-11 19:44 出处:网络
It's difficult to tell what is being asked here. This question is amb开发者_开发知识库iguous, vague, incomplete, overly broad, or rhetorical andcannot be reasonably answered in its current for
It's difficult to tell what is being asked here. This question is amb开发者_开发知识库iguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 10 years ago.

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


he probably means unit tests

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消