1  配置

项目右击==》properties==>project facets==>convert to faceted form...复选框选中java 和 jpa==》further configuration available

==>eclipse link 2.5x==>user librarys==>下载eclipselink2.5.2jar包并选中==》add connection ==>选中上一节自己建的mysql数据库==》选中复选框 add driver library to build path==>  选中复选框 override default schema ...OK即可

 

2  使用

右键项目 ==》properties ==>JPA tools ==>Generate entities from tables... ==》选中相应的table ==》主键生成策略 默认选择identity  ==》选好package ==>finish即可

posted on 2018-07-30 11:26  菜鸟乙  阅读(128)  评论(0编辑  收藏  举报