类 AuditEvent
java.lang.Object
org.springframework.boot.actuate.audit.AuditEvent
- 所有已实现的接口:
Serializable
A value object representing an audit event: at a particular time, a particular user or
agent carried out an action of a particular type. This object records the details of
such an event.
Users can inject a AuditEventRepository
to publish their own events or
alternatively use Spring's ApplicationEventPublisher
(usually obtained by
implementing ApplicationEventPublisherAware
) to publish AuditApplicationEvents
(wrappers for AuditEvent).
- 从以下版本开始:
- 1.0.0
- 作者:
- Dave Syer
- 另请参阅:
-
构造器概要
构造器构造器说明AuditEvent
(String principal, String type, String... data) Create a new audit event for the current time from data provided as name-value pairs.Create a new audit event for the current time.Create a new audit event. -
方法概要
-
构造器详细资料
-
AuditEvent
Create a new audit event for the current time.- 参数:
principal
- the user principal responsibletype
- the event typedata
- the event data
-
AuditEvent
Create a new audit event for the current time from data provided as name-value pairs.- 参数:
principal
- the user principal responsibletype
- the event typedata
- the event data in the form 'key=value' or simply 'key'
-
AuditEvent
Create a new audit event.- 参数:
timestamp
- the date/time of the eventprincipal
- the user principal responsibletype
- the event typedata
- the event data
-
-
方法详细资料
-
getTimestamp
Returns the date/time that the event was logged.- 返回:
- the timestamp
-
getPrincipal
Returns the user principal responsible for the event or an empty String if the principal is not available.- 返回:
- the principal
-
getType
Returns the type of event.- 返回:
- the event type
-
getData
Returns the event data.- 返回:
- the event data
-
toString
-