For each container field that's found, @ImportTestcontainers
creates a TestcontainerFieldBeanDefinition
. Such definitions don't work with AOT due to their use of an instance supplier.
Comment From: nosan
I've prepared a fix for 3.4.x and beyond
https://github.com/spring-projects/spring-boot/compare/3.4.x...nosan:gh-42875