摘要:
1,问题:An AnnotationConfiguration instance is required to use <mapping class="vo.Student"/>解答:错误:SessionFactory factory = new Configuration().configure().buildSessionFactory(); //这句是用映射文件为xml的 正确:SessionFactory factory = new AnnotationConfiguration().configure().buildSessionFactory();/ 阅读全文