spring-attic / spring-native

Spring Native is now superseded by Spring Boot 3 official native support
https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html
Apache License 2.0
2.74k stars 355 forks source link

Add cloud-stream-kafka back into samples #1672

Closed onobc closed 2 years ago

onobc commented 2 years ago

When combined w/ the changes in https://github.com/spring-cloud/spring-cloud-stream/pull/2456 ./build.sh --aot-only passes.

Next steps are to work on the native image build/run.

@mhalbritter are you ok if we add this back here in spring-native repo and then once it is all working, then I can move it into smoke tests repo?

Steps to test-drive

cc: @OlgaMaciaszek

mhalbritter commented 2 years ago

Sure, merged!

onobc commented 2 years ago

@olegz Here are some direct commands to build time AOT and then runtime AOT

../../mvnw clean package -Dspring-boot.run.jvmArguments="-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n"
java -Dspring.aot.enabled=true '-agentlib:jdwp=transport=dt_socket,address=*:8000,server=y,suspend=n' -jar target/cloud-stream-kafka-0.0.1-SNAPSHOT.jar