내 DAO의 원격 위치에서 xml 파일을 읽으려고합니다.스프링 콩에 xml 파일 삽입
<bean id="queryDAO"
class="com.contextweb.openapi.commons.dao.reporting.impl.QueryDAOImpl">
<property name="dataSource" ref="myDS"/>
<property name="inputSource" ref="xmlInputSource"/>
</bean>
<bean id="fileInputStream" class="java.io.FileInputStream">
<constructor-arg index="0" type="java.lang.String"
value="${queriesFileLocation}"/>
</bean>
<bean id="xmlInputSource" class="org.xml.sax.InputSource">
<constructor-arg index="0" >
<ref bean="fileInputStream"/>
</constructor-arg>
</bean>
처음으로 XML을 읽을 수 있습니다. 후속 요청의 경우, 입력 스트림이 고갈됩니다.
하지만 xml을 한 번만로드하려고합니다. 가능한가? –