Sample audit4j applications.
example taken from SpringBoot documentation https://spring.io/guides/gs/securing-web/
the login page is http://localhost:8080
The users passwords are user/password and user2/password2.
the following page http://localhost:8080/hello is audited.
Simple example showing how to integrate the @Audit annotation using aspectj.
example showing the usage of audit4j with Kotlin "Petclinic" application
this example is coming from the following github repositories https://github.com/spring-petclinic/spring-petclinic-kotlin https://github.com/spring-projects/spring-petclinic
Of course the annotation @Audit works fine.
AuditManager
val actor = MyApplicationContext.getAuthenticatedUser()
var manager = AuditManager.getInstance()
manager.audit(AuditEvent(actor, "myMethod", Field("myParam1Name", myParam1), Field("myParam2Name", myParam2)))
val actor = MyApplicationContext.getAuthenticatedUser()
var builder = EventBuilder();
builder.addActor(actor).addAction("myMethod").addField("myParam1Name", myParam1).addField("myParam2Name", myParam2)
var manager = AuditManager.getInstance()
manager.audit(builder.build())