You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/docs/asciidoc/40-events.adoc
+17Lines changed: 17 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -139,6 +139,23 @@ Each log entry contains the original event in serialized form.
139
139
The `EventSerializer` abstraction contained in `spring-modulith-events-core` allows plugging different strategies for how to turn the event instances into a format suitable for the datastore.
140
140
Spring Modulith provides a Jackson-based JSON implementation through the `spring-modulith-events-jackson` artifact, which registers a `JacksonEventSerializer` consuming an `ObjectMapper` through standard Spring Boot auto-configuration by default.
141
141
142
+
[[events.customize-publication-date]]
143
+
== Customizing the Event Publication Date
144
+
By default, the Event Publication Registry will use the date returned by the `Clock.systemUTC()` as event publication date.
145
+
If you want to customize this, register a bean of type clock with the application context:
146
+
147
+
[source, java]
148
+
----
149
+
@Configuration
150
+
class MyConfiguration {
151
+
152
+
@Bean
153
+
Clock myCustomClock() {
154
+
return … // Your custom Clock instance created here.
0 commit comments