解决方案 »
- java时间转换
- struts,问个简单的
- 请求帮助!
- js 获得文本编辑控件的数据为undefine
- 从哪儿能找到JPETSHOP的资料,尤其是JPETSHOP的例子...
- 求救!怎么在quartz里面动态的添加任务job?
- hibernate里可以用传统的sql语句查询么?不用hql
- java中collection对象的add方法可以存放collection对象吗?
- Hibernate插入数据时出现死循环
- 如何用JAVA把数据批量从oracle中取出,再批量地插入到mysql中
- JAVA后加'$'符号是指什么?
- log4j写入数据库 log4j:ERROR Failed to excute sql java.sql.SQLException: ORA-00917: 缺失
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.AnnotationConfiguration;
import org.hibernate.tool.hbm2ddl.SchemaExport;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;import com.model.*;
public class StudentTest {
private static SessionFactory sessionFactory = null;
// @BeforeClass
public static void beforeClass(){
sessionFactory = new AnnotationConfiguration().configure().buildSessionFactory();
}
// @AfterClass
public static void afterClass(){
sessionFactory.close();
}
@Test
public void testSchemaExport() {
new SchemaExport(new AnnotationConfiguration().configure()).create(false, true);
}}
配置文件中集合支持hashSet么?
好像hibernate的配置文件支持:set,map,list,array,bag