Croway opened a new pull request, #198:
URL: https://github.com/apache/camel-spring-boot-examples/pull/198
## Summary
- Fixed `${header.CamelTimerFiredTime}` resolving to an empty string in all
three routes (Java/YAML/XML DSL). camel-timer stopped populating the
fired-time/metadata headers by default in Camel 4.1 (CAMEL-19817); the fix adds
`includeMetadata=true` to each timer endpoint, matching the pattern already
used in the `kafka-oauth` example.
- Fixed native-image support, which was previously untested in this example
(no GraalVM available locally at the time). Building with a current GraalVM
(25.3.4 CE) failed at runtime with `MissingReflectionRegistrationError` for
several Camel-internal classes instantiated via reflection outside of Spring
AOT's visibility (type converter loaders, the Simple/Constant languages, the
timer/bean components, XML/YAML route loaders, etc.), plus a missing SPI
resource (`resource-resolver/source`) and an unsupported `UTF-32BE` charset
used by snakeyaml. Added `reflect-config.json`/`resource-config.json`
(generated via the GraalVM tracing agent) and a `native-image.properties`
enabling `-H:+AddAllCharsets` under `META-INF/native-image` so `mvn -Pnative
native:compile` now produces a working native executable.
- Refreshed the README sample output, which was stale (Spring Boot 3.1.0 /
Camel 4.0.0-SNAPSHOT), to match the current Spring Boot 4.1.1 / Camel
4.23.0-SNAPSHOT versions and current timings, and simplified the GraalVM
install steps since recent distributions bundle `native-image` by default.
## Test plan
- [x] `mvn spring-boot:run` (JVM mode) — all three routes log a real
timestamp for `${header.CamelTimerFiredTime}`
- [x] `java -jar target/camel-example-spring-boot-aot-basic-*.jar` — same,
~1.2s startup
- [x] `mvn -Pnative native:compile` with GraalVM CE 25.3.4 (installed via
sdkman) — builds successfully
- [x] Running the built native executable — starts successfully, all three
routes log real timestamps, Camel context starts in ~1ms, app ready in ~66-82ms
- [x] Repeated clean build (`mvn clean` + native rebuild + run) to confirm
reproducibility
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01EV52HxRX2Ws2u8m575mmpv
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]