一、配置数据库

IDEA使用Hibernate生成实体类

IDEA使用Hibernate生成实体类

IDEA使用Hibernate生成实体类

点击OK即可

IDEA使用Hibernate生成实体类

 

二、添加Hibernate Facet,并生成实体类

右键项目,选择“add framework support”

IDEA使用Hibernate生成实体类

选择“hibernate”,并选择生成database schema

IDEA使用Hibernate生成实体类

选择需要保存到的package,勾选需要生成的实体类,选择映射方式(配置文件或注解),点击OK即可。

IDEA使用Hibernate生成实体类

相关文章: