I am working on a spring boot application with apache camel which uses applicationContext.xml to initialise the spring context. I want to convert this spring boot app to spring native image, i want to understand how would the spring ahead of time processing work in this case as the spring beans I want in the spring context must be picked from applicationContext.xml. Do I have to write custom hints so native image picks up the applicationContext.xml and includes the bean definitions from xml ? spring boot version 3, spring version 6, camel version 4 ( Milestone 3 ).
I tried :- I created the native image following the documentation https://docs.spring.io/spring-boot/docs/current/reference/html/native-image.html# The image is build successfully but when i try to run the native image it fails with error "native image Web application could not be started as there was no org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context". I think this might be due to context xml not being parsed by the AOT processor. I was expecting the application to start as it does on Jit JVM.