You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I created a simple spring boot web application which uses applicationContext.xml to define a bean. The application runs fine on jvm and serves a simple hello user message on rest call. But when I convert this application to spring boot native image it fails to run because it cannot find this bean defined in the applicationContext.xml. I used @ImportResource("applicationContext.xml") to read the context file. The xml is placed in src/main/resources folder. It seems that spring native image cannot read the xml file and completely ignores it.
I have build the image using native build tools with GraalVM distribution.
Can you please help.
The text was updated successfully, but these errors were encountered:
I see that the xml configuration beans in this git project https://github.com/spring-tips/spring-boot-3-aot works fine. I found the problem is with creating and injecting beans with properties via constructor or setter injections. I am using spring version 6.0.10 and spring boot version 3.
Can you please let me know if this a limitation on the spring in current version and if we have an open issue for this. Thanks.
I created a simple spring boot web application which uses applicationContext.xml to define a bean. The application runs fine on jvm and serves a simple hello user message on rest call. But when I convert this application to spring boot native image it fails to run because it cannot find this bean defined in the applicationContext.xml. I used @ImportResource("applicationContext.xml") to read the context file. The xml is placed in src/main/resources folder. It seems that spring native image cannot read the xml file and completely ignores it.
I have build the image using native build tools with GraalVM distribution.
Can you please help.
The text was updated successfully, but these errors were encountered: