Exception in thread "main" Org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Articledaoimpl ': Injection of resource methods failed; Nested exception is org.springframework.beans.factory.BeanCreationException:Error creating beans with Name ' Sessionfactory ' defined in class path resource [Applicationcontext.xml]: Invocation of Init method failed; Nested exception is org.hibernate.AnnotationException:mappedBy reference an unknown target entity Property:com.wangzhe. Model. Keyword.articles in Com.wangzhe.model.Article.keywords
Above is a critical part of the error
error reason: In one-to-many annotation configuration: @OneToMany ( Mappedby = "articles"), Mappedby points to the property to be associated, not the class to be associated with,
if so configured, Hibernate will look for the articles property below the Com.wangzhe.model.Keyword class. However, without this property, the exception is reported above
method: Specifies the property associated to the actual: that is: @OneToMany (mappedby = "articles ")