我知道之前已经多次询问过这个问题,但批量生产tomcat服务器错误:job标记。该应用程序在IntelliJ + tomcat插件中运行良好。代理不允许服务器下载任何模式,但这似乎不会影响bean或tx标记
<tx:annotation-driven mode="aspectj" transaction-manager="transactionManager"/>
<batch:job id="createCsvForJob">
<batch:step id="createCsvFile">
<batch:tasklet ref="createCsvForTasklet" />
</batch:step>
</batch:job>
我可以下载schemaLocation网址,因此我不认为其中有任何奇怪的字符或拼写错误。我有什么明显的遗失吗?
<?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:batch="http://www.springframework.org/schema/batch"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
">
答案 0 :(得分:1)
我的修复是在schemaLocation中包含版本号,即
bounds
所以我现在有了
http://www.springframework.org/schema/batch/spring-batch-2.0.xsd
原因是因为我的服务器无法访问互联网,所以需要使用war文件中包含的那个。要查找正确的版本号I命令,请单击IntelliJ
中的xmlns URL<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:task="http://www.springframework.org/schema/task"
xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/batch http://www.springframework.org/schema/batch/spring-batch-2.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.xsd
">
然后阅读版权号码。
希望这有助于其他人。