Questions tagged «spring-data»

Spring Data是一个伞形开源项目,其中包含许多特定于给定数据库的子项目。这些项目是与这些令人兴奋的技术背后的许多公司和社区共同开发的。

8
Spring数据jpa-未定义名为'entityManagerFactory'的bean。自动连接的依赖项注入失败
我正在使用spring数据jpa,hibernate,mysql,tomcat7,maven开发应用程序,并且创建错误。我试图弄清楚,但失败了。 错误是在设置构造函数参数时无法解析对bean'entityManagerFactory'的引用;没有定义名为'entityManagerFactory'的bean。自动连接的依赖项注入失败 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'initDbService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.wahid.cse.repository.RoleRepository org.wahid.cse.service.InitDbService.roleRepository; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'roleRepository': Cannot create inner bean '(inner bean)#c08f81' of type [org.springframework.orm.jpa.SharedEntityManagerCreator] while setting bean property 'entityManager'; nested …

12
删除无法使用JpaRepository
我有一个Spring 4应用程序,试图从数据库中删除实体的实例。我有以下实体: @Entity public class Token implements Serializable { @Id @SequenceGenerator(name = "seqToken", sequenceName = "SEQ_TOKEN", initialValue = 500, allocationSize = 1) @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "seqToken") @Column(name = "TOKEN_ID", nullable = false, precision = 19, scale = 0) private Long id; @NotNull @Column(name = "VALUE", unique = true) …

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.