我收到文件中最后一个实例的错误。为什么是这样?我只是想创建一些持有字符串的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>