mysql - 我如何使用hibernate在jsp页面中登录

标签 mysql hibernate authentication

我在 jsp 页面和 mySQL 中使用 hibernate,我知道如何保存这样的 session :

<%Session hibernateSession = MyDB.HibernateUtil.currentSession();  Transaction tx = hibernateSession.beginTransaction(); 
Student std = new Student(); 
std.setUserName("David");
hibernateSession.save(std);%>

,但是我如何从表中选择并像在 mysql select * from Student where userName = *** 中一样打印它以及如何更新?

最后我可以在登录中使用 hibernate 吗?

最佳答案

关于mysql - 我如何使用hibernate在jsp页面中登录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6447715/

相关文章:

java - JPA 2 Criteria 与抽象集合相结合

authentication - 为什么证书在 SSL 认证中不是 secret

spring - 创建帐户,忘记密码和更改密码

mysql - 在mysql中选择具有time_stamp差异的查询

php - 不同条件下的计数

mysql - 有些选集我不知道怎么写

java - 如何使用 Spring、Hibernate、MySQL ISAM 进行事务处理?

hibernate - 为 Hibernate 构建可重用的修改/创建的列

php - 使用Javascript XmlHttpRequest和PHP保护Web服务调用的安全

php - 为 IN 语句 PDO MYSQL 转义字符串数组