ModuleDAO data = new ModuleDAO();
data.setFirstName("asd2sedd");
data.setLastName("Lasst");
Configuration con = new Configuration().configure().addAnnotatedClass(ModuleDAO.class);
ServiceRegistry registry = new StandardServiceRegistryBuilder().applySettings(con.getProperties()).build();
SessionFactory sf = con.buildSessionFactory(registry);
Session session = sf.openSession();
Transaction t = session.beginTransaction();
session.save(data);
t.commit();
sf.close();
Databse是Mysql,并且它在具有默认端口的同一机器上运行
javax.net.ssl.SSLException 消息:在接收对等方的close_notify之前关闭入站
异常消息:
javax.net.ssl.SSLException:在接收对等方的close_notify之前关闭入站