spring - org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'helper' . No unique bean of type [java.lang.String] -
i want autowire string constructor. i have in spring config xml: <bean id="helper" class="test.helper"> <constructor-arg index="3" type="java.lang.string" value="http://test.com" /> </bean> helper.java @component public class helper { private final clientfactory clientfactory; private final modelmanager modelmanager; private final securityservice securityservice; private final string url; @autowired public helper(clientfactory clientfactory, modelmanager modelmanager, securityservice securityservice, string url) { this.clientfactory = clientfactory; this.modelmanager = modelmanager; this.securityservice = securityservice; this.url = url; } } i getting error: org.springframework.beans.factory.nosuchbeandefinitionexception: no unique bean of type [java.lang.string] defined: expected single matching bean found 19: any apprecia