读书人

组件投射

发布时间: 2012-08-22 09:50:35 作者: rapoo

组件映射

xml配置方式:

tb_user

字段名主键类型描述idpkint编号first_name?varchar(50)姓last_name?varchar(50)名birthday?Date出生年月

?

package com.zchen.hibernate;import org.hibernate.cfg.AnnotationConfiguration;import org.hibernate.tool.hbm2ddl.SchemaExport;import org.junit.Test;public class Snippet {@Testpublic void testSchemaExport(){new SchemaExport(new AnnotationConfiguration().configure()).create(true, true);}}

?

读书人网 >软件架构设计

热点推荐