Closed deodorel closed 1 year ago
If you'd like us to spend some time investigating, please take the time to provide a complete minimal sample (something that we can unzip or git clone, build, and deploy) that reproduces the problem.
Hello, thank you for your reply. I will try to prepare a simple example.
i just ran mvn clean spring-boot:build-image
you will see the aot error. I noticed that the constructor injection works, while the property one / via setter does not.
Same issue. By doing mvn package
, which will call aot plugin, to Spring project that with xml-based bean injection may triggers IllegalArgumentException: Parameter of type org.springframework.beans.factory.config.TypedStringValue is not supported with xml bean definitions
error unexpectly .
Also check sample project, in which there is no xml-based bean injection invoked.
Are there any plans to fix this or workaround action to tackle with? thanks
This is likely going to be supported with Spring Framework 6, see https://github.com/spring-projects/spring-framework/issues/29074 related issue, so I would advise to switch when released and will close this issue as declined on Spring Native side.
Hello, I am trying to convert a project to spring native, and i have a lot of bean definitions in xml. I have enabled xml support,however when the files are parsed by the aot, i am getting this error:
Caused by: java.lang.IllegalArgumentException: Parameter of type org.springframework.beans.factory.config.TypedStringValue is not supported at org.springframework.aot.context.bootstrap.generator.bean.support.ParameterWriter.writeParameterValue(ParameterWriter.java:175) at org.springframework.aot.context.bootstrap.generator.bean.support.ParameterWriter.writeParameterValue(ParameterWriter.java:81) at org.springframework.aot.context.bootstrap.generator.bean.support.ParameterWriter.writeParameterValue(ParameterWriter.java:70)
The definition in question is: `
<bean id="fixedBackOffPolicy" class="org.springframework.retry.backoff.FixedBackOffPolicy">
`
I looked into the code of the ParameterWriter, but it's not clear to me what a TypedStringValue is.
If i remove the property definition this bean is cleared, however i can't see how can i specify properties if you can't do a simple string -> long mapping. Any suggestions?
Thanks!