摘要: /* * //创建hibernate配置对象 Configuration cfg = new Configuration(); cfg.configure("hibernate.cfg.xml"); //注册配置属性信息 ServiceRegistry sr = new StandardServiceRegistr... 阅读全文
posted @ 2019-05-21 15:07 永远没对象 阅读(813) 评论(0) 推荐(0) 编辑
摘要: 参考别人的博客,原因是:数据库和系统时区的差异。 在jdbc的url后面加 由于新安装的mysql,第一次连接出现了access denied for user 'root'@'localhost'(using password:YES)问题。 没有大毛病就是密码写错了。jdbc连接的密码换上我安装 阅读全文
posted @ 2019-05-21 11:42 永远没对象 阅读(181) 评论(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 永远没对象 阅读(472) 评论(0) 推荐(0) 编辑