我目前正在尝试在这个项目上工作:https : //www.devglan.com/spring-boot/file-upload-angularjs-spring-boot-rest intellij,我正在让它运行. 它设法在我的控制台中加载和显示 Spring 徽标,但我一直遇到一个错误,提示创建名为“entityManagerFactory”的 bean 时出错,我不太确定如何解决它。我已经阅读了一些具有类似问题的线程,但不幸的是,这些解决方案没有奏效。这是完整的错误代码
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: Invocation of init method failed; nested exception is org.hibernate.AnnotationException: No identifier specified for entity: com.formupload.demo.service.Document
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1699) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:573) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) ~[spring-beans-5.0.8.RELEASE.jar:5.0.8.RELEASE]
我是这种开发的新手,所以我非常感谢我能得到的任何帮助。
慕娘9325324
相关分类