2013年7月31日

hibernate第一个程序

摘要: public class Client { public static void main(String[] args) { //读取ibernate.cfg.xml Configuration cfg = new Configuration().configure(); //创建SessionFactory SessionFactory factory = cfg.buildSessionFactory(); Session session =null; try{ //创建session session = factory.openSession(); //开启... 阅读全文

posted @ 2013-07-31 09:51 鱼东鱼 阅读(158) 评论(0) 推荐(0) 编辑

hibernate学习笔记1

摘要: //读取ibernate.cfg.xml Configuration cfg = new Configuration().configure(); //创建 SchemaExport SchemaExport export = new SchemaExport(cfg); export.create(true, true);hibernate.cfg.xml jdbc:mysql://127.0.0.1/hibernate_first com.mysql.jdbc.Driver root best org.hibernate.dialect.MySQLDialect ... 阅读全文

posted @ 2013-07-31 09:35 鱼东鱼 阅读(142) 评论(0) 推荐(0) 编辑

导航