0
システムを実行しようとしているときにそのタグが無効であるSAXParserExceptionが発生しました。スプリングバッチ: 'batch:job'要素で始まる無効なコンテンツが見つかりました
以下私のxmlです:
以下<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:batch="http://www.springframework.org/schema/batch"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd
http://www.springframework.org/schema/util
http://www.springframework.org/schema/util/spring-util-4.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.2.xsd
http://www.springframework.org/schema/batch
http://www.springframework.org/schema/batch/spring-batch.xsd"
default-lazy-init="true">
<bean id="myItemProcessor" class="com.MyItemProcessor"/>
<bean id="myItemReader" class="com.MyItemReader"/>
<bean id="myItemWriter" class="com.MyItemWriter"/>
<batch:job id="helloWorldJob">
<batch:step id="step1">
<batch:tasklet>
<batch:chunk reader="myItemReader" writer="myItemWriter"
processor="myItemProcessor" commit-interval="10">
</batch:chunk>
</batch:tasklet>
</batch:step>
</batch:job>
は、私は入れません例外です:
CVC-複雑-type.2.4.c:一致するワイルドカードは厳しいです要素 'batch:job'の宣言は見つかりません。
を以下に行う試みたが、運:
1)は、XSDの異なる点バージョンに変更するクラスパス
2)からXSDを試み参照試しました。しかし、それでも問題は変わりません。
ここで何か問題がありますか?
xsdバージョンを2.2に変更しようとしました。まだ運がない。同じ例外です。 – Raghav
このように使用してください:http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd – pringi