spring 初级使用的问题(ClassPathResource).
1public static void main(String[] args) {
2 // TODO Auto-generated method stub
3 Resource res = new ClassPathResource("bean.xml");
4 BeanFactory factory = new XmlBeanFactory(res);
5
6 Student stu = (Student)factory.getBean("student");
7 System.out.println(stu.GetBookName());
8}
3行和4行出现
ClassPathResource cannot be resolved to a type
XmlBeanFactory cannot be resolved to a type
的现象
初spring 请指教,该如何解决,import package么?