hibernate建立helloworld

加入相应的包:

hibernate建立helloworld

Annotation:

Teacher.java:

hibernate建立helloworld

ZhiCheng.java是枚举类型的,右键-->new-->Enum

hibernate建立helloworld

TeacherTest.java是一个测试类:右键-->new-->Junit Test Case

hibernate建立helloworld

表就键出来了:

hibernate建立helloworld

Xml:

Student.java:

hibernate建立helloworld

Student.hbm.xml:

hibernate建立helloworld

建测试类:

hibernate建立helloworld

StudentTest.java:

hibernate建立helloworld

hibernate.cfg.xml:

hibernate建立helloworld

hibernate建立helloworld

 

 

相关文章:

  • 2021-09-06
  • 2021-12-31
  • 2021-10-14
  • 2022-12-23
  • 2021-04-06
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-30
  • 2022-12-23
  • 2021-11-22
  • 2021-04-27
  • 2021-11-19
  • 2022-12-23
相关资源
相似解决方案