📄 exportdb.java
字号:
package com.hibernate;
import org.hibernate.cfg.Configuration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
/*
* hbm2ddl工具类 将实体类生成数据库表
*/
public class ExportDB {
public static void main(String[] args) {
Configuration cfg = new Configuration().configure() ;
SchemaExport export = new SchemaExport(cfg) ;
export.create(true, true) ;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -