1、点击window–>show view–>Data Source Explorer,选中Database Connections,点击右键,选择new…,选择mysql,点击next,然后如图所示,点击按钮,eclipse中JPA的使用
添加本地mysql驱动,然后点击JAR List,如图所示:
eclipse中JPA的使用
点击Properties,如图所示:
eclipse中JPA的使用
点击ok,然后点击test connection,如果ping success表示成功,否则检查问题,重新test connection。
2、点击new–>other–>jpa project,然后填写工程名和运行环境,如图所示
eclipse中JPA的使用
然后点击next,出现如图界面,配置connection,
eclipse中JPA的使用
点击finish,工程建好了,再右键属性,就会看到jpa 工具,上面配置完成,在项目文件夹上右键选择JPA tools->Generate Entities from Tables.后就可以生成表对应的实体类。

相关文章:

  • 2021-10-03
  • 2022-01-07
  • 2021-10-06
  • 2022-12-23
  • 2021-06-16
  • 2021-12-30
  • 2021-09-29
猜你喜欢
  • 2021-10-04
  • 2021-05-15
  • 2022-12-23
  • 2021-09-07
  • 2021-07-17
  • 2022-12-23
  • 2021-07-03
相关资源
相似解决方案