Практически в каждом проекте spring используется spring - beans.xsd(более точно). Однако, если вы посмотрите на файл, http://www.springframework.org/schema/beans/spring-beans.xsd, вы увидите, что это версия 3.2 и не имеет определения для атрибут "local".
Что еще более интересно, так это то, что http://www.springframework.org/schema/beans/spring-beans-3.2.xsd действительно определяет "локальный".
Кроме того, поскольку файл вытаскивается из банки (org/springframework/ beans/factory/xml/spring - beans -3.2.xsd) из-за spring.schema, я не Не думаю, что любой проект будет иметь проблемы компиляции или выполнения.
Eclipse xml validator, с другой стороны, я думаю, использует только интернет-ссылку и показывает ошибку xml, а точнее:
"cvc-complex-type.3.2.2: Атрибут 'local' не может появляться в элементе 'ref'"
Это ошибка?
Изменить: По запросу это мой заголовок spring:
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util"
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:p="http://www.springframework.org/schema/p"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd">
Изменить 2: здесь я использую локальный
<bean id="bar"
class="org.springframework.batch.item.support.CompositeItemWriter">
<property name="delegates">
<list>
<ref local="foo" />
</list>
</property>
</bean>
<bean id="foo" class="java.lang.String" />