Ошибка при создании компонента компонента с типом Java.io.file [Виды аргументов Ambousure Constructor]

У меня есть следующая конфигурация подсветки

  <bean id="fileBean" class="java.io.File">
    <constructor-arg type="java.lang.String" 
                     value="$prop{file.path.property}" />    
  </bean>

, я получаю следующую ошибку

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

Только один конструктор для Java.io.File с одним строковым параметром, поэтому я не уверен, почему это неоднозначно. Любая помощь оценила.

14
задан cyber-monk 7 September 2011 в 19:37
поделиться