Spring - Conf / Constructor-Arg

mavinatic

Bekanntes Mitglied
Hallo Community,

ich habe eine Klasse, welche ich vererbe (AbstractService) an die Klasse "InternalDataStoreService" nun möchte ich mit Spring die Bean aus dem Context aufrufen. Der Konstruktor der Klasse "AbstractService" wird ein String übergeben. Das tue ich alles genauso konfigurieren und ich bekomme dennoch folgende Exception:

"org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'iDataStore' defined in class path resource [context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [java.lang.String]: Ambiguous constructor argument types - did you specify the correct bean references as constructor arguments?"

[XML]<bean id="iDataStore"
class="xx.InternalDataStoreService">
<constructor-arg name="serviceName" value="InternalDataStoreService" />
</bean>[/XML]

Was mache ich falsch?
Grüße
 

Zurück
Oben