1<?xml version="1.0" encoding="UTF-8"?> 2<!-- 3 Copyright 2007 the original author or authors. 4 5 Licensed under the Apache License, Version 2.0 (the "License"); 6 you may not use this file except in compliance with the License. 7 You may obtain a copy of the License at 8 9 http://www.apache.org/licenses/LICENSE-2.0 10 11 Unless required by applicable law or agreed to in writing, software 12 distributed under the License is distributed on an "AS IS" BASIS, 13 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 See the License for the specific language governing permissions and 15 limitations under the License. 16--> 17 18<!-- Spring Framework configuration for StubFtpServer --> 19<!-- The SpringConfigurationTest class has dependencies on 20 several of the bean names and values configured within this file --> 21 22<beans xmlns="http://www.springframework.org/schema/beans" 23 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 24 xsi:schemaLocation="http://www.springframework.org/schema/beans 25 http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"> 26 27 <bean id="stubFtpServer" class="org.mockftpserver.stub.StubFtpServer"> 28 <property name="serverControlPort" value="9981" /> 29 <property name="commandHandlers"> 30 <map> 31 32 <entry key="LIST"> 33 <bean class="org.mockftpserver.stub.command.ListCommandHandler"> 34 <property name="directoryListing"> 35 <value> 36 11-09-01 12:30PM 406348 File2350.log 37 11-01-01 1:30PM <DIR> 0 archive 38 </value> 39 </property> 40 </bean> 41 </entry> 42 43 <entry key="PWD"> 44 <bean class="org.mockftpserver.stub.command.PwdCommandHandler"> 45 <property name="directory" value="foo/bar" /> 46 </bean> 47 </entry> 48 49 <entry key="DELE"> 50 <bean class="org.mockftpserver.stub.command.DeleCommandHandler"> 51 <property name="replyCode" value="450" /> 52 </bean> 53 </entry> 54 55 <entry key="RETR"> 56 <bean class="org.mockftpserver.stub.command.RetrCommandHandler"> 57 <property name="fileContents" 58 value="Sample file contents line 1 Line 2 Line 3"/> 59 </bean> 60 </entry> 61 62 </map> 63 </property> 64 </bean> 65 66</beans>