05 2019 档案

摘要:在此版本的限定查询和4.0版本的限定查询: 如果查询语句是: 阅读全文
posted @ 2019-05-31 13:56 永远没对象 阅读(1532) 评论(0) 推荐(0)
摘要:public class HibernateUtils { private static SessionFactory sf; static{ sf = new Configuration().configure().buildSessionFactory(); } public static SessionFactory getSessionFactory(){ r... 阅读全文
posted @ 2019-05-22 18:20 永远没对象 阅读(115) 评论(0) 推荐(0)
摘要:/* * //创建hibernate配置对象 Configuration cfg = new Configuration(); cfg.configure("hibernate.cfg.xml"); //注册配置属性信息 ServiceRegistry sr = new StandardServiceRegistr... 阅读全文
posted @ 2019-05-21 15:07 永远没对象 阅读(834) 评论(0) 推荐(0)
摘要:参考别人的博客,原因是:数据库和系统时区的差异。 在jdbc的url后面加 由于新安装的mysql,第一次连接出现了access denied for user 'root'@'localhost'(using password:YES)问题。 没有大毛病就是密码写错了。jdbc连接的密码换上我安装 阅读全文
posted @ 2019-05-21 11:42 永远没对象 阅读(193) 评论(0) 推荐(0)
摘要:public static void main(String[] args) { /*//创建hibernate配置对象 Configuration cfg = new Configuration(); //指定hibernate.cfg.xml的位置.一般指默认位置不用指定。如果换了就必须指定。 cfg.configure("hi... 阅读全文
posted @ 2019-05-21 11:15 永远没对象 阅读(502) 评论(0) 推荐(0)