1.无论是idea还是eclipse都可以通过表结构逆向生成实体类,eclipse操作教程, idea操作教程
2.你说的Spring Data JPA全自动化可能是指实体类的Repository接口(类似Mapper接口)继承JpaRepository后,通过定义 find/get属性名1And属性名2() 方法,不用自己写具体SQL,框架自动生成以属性1和属性2对应的数据库字段名为条件的SQL查询.举个例子,有个Student类,有username,class等属性,通过在StudentRepository中定义findUsernameAndClass(String username,String class);框架会自动生成类似 select id,username,class from student where username =? and class =? 的sql. Spring Data JPA还可以通过Specification或者Example构建查询条件,也可以通过@Query注解或者HQL实现自定义SQL查询.