@@ -167,25 +167,27 @@ public FireflyEdaAutoConfiguration(EdaProperties props) {
167167 * {@code orchestrationPersistenceObjectMapper}, {@code sagaObjectMapper}) that
168168 * coexist in the Spring context for internal framework use.
169169 * <p>
170- * The mapper invokes {@link ObjectMapper#findAndRegisterModules()} to auto-discover
171- * every Jackson module on the classpath — at minimum {@code jackson-datatype-jsr310}
172- * (Java 8 date/time) and {@code jackson-datatype-jdk8} ({@link java.util.Optional}
173- * and friends), both of which are compile-scope transitive dependencies of this
174- * module. If parameter names or other modules are present, they are picked up too,
175- * keeping the primary mapper "general purpose" by design.
170+ * Built through Spring Boot's autoconfigured {@link Jackson2ObjectMapperBuilder},
171+ * so it honours every {@code spring.jackson.*} property the application sets in
172+ * its {@code application.yaml} — most importantly
173+ * {@code spring.jackson.serialization.write-dates-as-timestamps=false} which
174+ * makes {@link java.time.Instant} / {@link java.time.LocalDateTime} fields
175+ * serialize as ISO-8601 strings instead of numeric epochs in WebFlux responses.
176+ * The builder also auto-registers every Jackson module on the classpath
177+ * ({@code jackson-datatype-jsr310}, {@code jackson-datatype-jdk8},
178+ * {@code jackson-module-parameter-names}, …).
176179 * <p>
177180 * The {@link ConditionalOnMissingBean @ConditionalOnMissingBean} guard preserves
178181 * compatibility with applications that already declare their own primary mapper.
179182 *
183+ * @param builder Spring Boot's autoconfigured {@code Jackson2ObjectMapperBuilder}
180184 * @return configured ObjectMapper instance
181185 */
182186 @ Bean
183187 @ Primary
184188 @ ConditionalOnMissingBean
185- public ObjectMapper objectMapper () {
186- ObjectMapper mapper = new ObjectMapper ();
187- mapper .findAndRegisterModules ();
188- return mapper ;
189+ public ObjectMapper objectMapper (org .springframework .http .converter .json .Jackson2ObjectMapperBuilder builder ) {
190+ return builder .build ();
189191 }
190192}
191193
0 commit comments