- JDK 21
- Graalvm-jdk-21.0.5+9.1
- Kotlin 1.9.x
- Spring Boot 3.3.x
- Spring Cloud 2023.0.3
- Resilience4j
- Hibernate
- Spring Data JPA
- MapStruct
- Undertow
- OpenFeign
- CloudEvents
- Open API Specification
- PostgreSQL
- JUnit 5
- DataFaker
- Kafka
- Redis
- Gradle
- Kapt
- Gradle Native Build tools
- RFC-9457
Component | Able To Run? |
---|---|
JPA | Yes |
Controllers | Yes |
Flyway | No |
OpenFeign | Yes |
Redis Client | Yes |
Kafka Client | Yes |
Resilience4j | Yes |
Map Struct | Yes |
Swagger UI | Yes |
Validation | Yes |
Cacheable | Yes |
Kafka Listener | Yes |
https://opentelemetry.io/blog/2023/spring-native/ https://github.com/open-telemetry/opentelemetry-java-examples/tree/main/spring-native
https://graalvm.github.io/native-build-tools/latest/gradle-plugin.html
given kotlin data class will generate few constructs, do not set default value for data class, otherwise MapStruct will not assign value to properties.
https://spring.io/guides/gs/caching
export JAVA_HOME="/Library/Java/JavaVirtualMachines/graalvm-jdk-21.0.5+9.1/Contents/Home"
export GRAALVM_HOME=$JAVA_HOME
export PATH=$GRAALVM_HOME/bin:$PATH
gradle clean nativeCompile
# BUILD SUCCESSFUL in 5m 18s
# 11 actionable tasks: 11 executed
Package size: ~250M
Duration: Started DemoApplicationKt in 1.121 seconds (process running for 1.132)
./build/native/nativeCompile/spring-native-image-demo
gradle clean nativeRun