import java.io.InputStream;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.ClassPathResource;
public class Main {
public static void main(String[] args) throws Exception {
BeanFactory beanFactory = new XmlBeanFactory(new ClassPathResource("context.xml"));
PropertyEditorTestBean testBean = (PropertyEditorTestBean) beanFactory.getBean("testBean");
System.out.println(testBean.getMyInputStream());
}
}
class PropertyEditorTestBean {
private InputStream myInputStream;
public InputStream getMyInputStream() {
return myInputStream;
}
public void setMyInputStream(InputStream myInputStream) {
this.myInputStream = myInputStream;
}
}
|