- Run
docker-compose up
in order to start Zookeeper and Kafka within docker container.
Args= -H:IncludeResources=logback.xml|application.yml
-H:Name=mn-pricing
-H:Class=com.danielprinz.udemy.Application
--report-unsupported-elements-at-runtime
--initialize-at-run-time=org.apache.kafka.common.security.authenticator.SaslClientAuthenticator
Some classes have to be initialized during an image runtime. That can be achieved by using the following option: --initialize-at-run-time=<class-name>
- When building
nativeImage
with gradle we have to be careful with how we are setting up dependencies e.g. if some test dependencies are problematic we have to replace the deprecatedtestCompile
withtestImplementation
. - Once everything configured, we can create a native image in the following way: $ ./gradlew nativeImage (or gradle nativeImage)
If native-image is successfully created, it can be launched by simply running the following command: .\build\native-image\application.exe