春季批次中的bean出错

时间:2015-09-21 18:52:27

标签: java spring spring-batch

我收到文件中最后一个实例的错误。为什么是这样?我只是想创建一些持有字符串的bean,我稍后可以参考。

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:batch="http://www.springframework.org/schema/batch"
xmlns:util="http://www.springframework.org/schema/util" 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.xsd
                    http://www.springframework.org/schema/batch
                    http://www.springframework.org/schema/batch/spring-batch.xsd
                    http://www.springframework.org/schema/util
                    http://www.springframework.org/schema/util/spring-util.xsd">

<import resource="classpath:/simple-job-launcher-context.xml" />
<import resource="classpath:/hibernate-context.xml" />
<import resource="classpath:/autowire-context.xml" />

<bean id="str" class="java.lang.String" factory-method="valueOf">
 <constructor-arg value="string_1"/>
</bean>

<bean id="str2" class="java.lang.String" factory-method="valueOf">
  <constructor-arg value="string_1"/>
</bean>

0 个答案:

没有答案