Что не так с моим контекстом Spring Batch? - PullRequest
2 голосов
/ 18 мая 2011

Вот контекст для Spring Batch:

<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
  xmlns:b="http://www.springframework.org/schema/batch"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="
    http://www.springframework.org/schema/beans
    http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
    http://www.springframework.org/schema/batch
    http://www.springframework.org/schema/batch/spring-batch-2.1.xsd">
  <b:job id="bar" job-repository="my-job-repository">
    <b:step id="foo">
      <b:tasklet transaction-manager="my-transaction-manager">
        <b:chunk reader="itemReader" writer="itemWriter"/>
      <b:tasklet>
    </b:step>
  </b:job>
</beans:beans>

Вот что говорит Spring Batch:

org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found
starting with element 'b:tasklet'. One of
'{"http://www.springframework.org/schema/batch":transaction-attributes,
"http://www.springframework.org/schema/batch":no-rollback-exception-classes,
"http://www.springframework.org/schema/batch":listeners,
"http://www.springframework.org/schema/beans":bean,
"http://www.springframework.org/schema/beans":ref}' is expected.

Что не так с моим XML?

пс. Я использую org.springframework.batch:spring-batch-core:2.1.7.RELEASE

1 Ответ

9 голосов
/ 18 мая 2011

Вы забыли закрыть тег tasklet.вероятно скопировал здесь и повторил ошибку

Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...