Skip to content

@Audit annotation does not work #78

@johno1985

Description

@johno1985

Version 2.5.0

I have added the @Audit annotation to one of my controller methods and have implemented the MetaData interface but no audit events are triggered

	@Audit
	public void handleRequest(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		logger.info("Received request: " + request.getRequestURI() + "?" + request.getQueryString());
                ...
        }
package com.launchworks.launchbi.audit;

import org.audit4j.core.MetaData;

public class AuditData implements MetaData {

	@Override
	public String getActor() {
		return "blah";
	}

	@Override
	public String getOrigin() {
		return "booh";
	}

}
!Configuration
handlers:
- !org.audit4j.handler.db.DatabaseAuditHandler
    embedded: false
    db_driver: com.mysql.cj.jdbc.Driver
    db_url: jdbc:mysql://localhost:3306/launchbi_audit_local?serverTimezone=UTC
    db_user: ***
    db_password:***
layout: 
  !org.audit4j.core.layout.SimpleLayout
    dateFormat: MM/dd/yyyy HH:mm:ss zzz
metaData: !com.launchworks.launchbi.audit.AuditData {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions