Hello Every One,
I have class A with constructor argument as (URI uri, Image image), where URI is java.net.URI and Image is java.awt.Image. I am trying to configure it via spring as:
But error is thrown as : Exception in
thread "main" org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'a' defined in class path resource [/context.spring.xml]: Unsatisfied dependency expressed through constructor argument with index 1 of type [java.awt.Image]: Could not convert constructor argument value of type [java.lang.String] to required type [java.awt.Image]: Failed to convert value of type 'java.lang.String' to required type 'java.awt.Image'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [java.lang.String] to required type [java.awt.Image]: no matching editors or conversion strategy found.
Please do provide your valuable suggestions.
Regards,
Looka