-
1 votesanswersviews
在大多数基本示例中,无法使用@PersistenceContext注入EntityManager
要使用PersistenceContext注入实体管理器来测试JPA,我有一个基本的示例项目,其结构如下:Person实体: @Entity public class Person { @Id @GeneratedValue private long id; private String name; private String surname; ...