This is a sample app to reproduce Spring Native issue. The issue seems to be around AutowireCapableBeanFactory
.
Components of the sample app:
SomeBean
andAnotherBean
are two mock beansTestController
just to test injection worked.index
method is to runAutowireCapableBeanFactory
autowiring manually.
- Build Docker image for the sample app
./gradlew bootBuildImage
and run itdocker run -it --rm -p 8080:8080 demo:0.0.1-SNAPSHOT
- Check output of
http://localhost:8080/
- should beAutowired
- Uncomment
bootBuildImage
configuration inbuild.gradle
to enable native build - Build Docker image for the sample app
./gradlew bootBuildImage
, now native - Check output of
http://localhost:8080/
- now it'sNot autowired
means object wasn't post-processed correctly