“No persistence unit with name 'product' found”

后端 未结 4 1648
攒了一身酷
攒了一身酷 2021-01-05 00:53

I recently completed this tutorial: \"http://static.springsource.org/docs/Spring-MVC-step-by-step/\", but now I want it to work with Hibernate and annotations. I know I\'m c

4条回答
  •  时光取名叫无心
    2021-01-05 01:39

    You need a META-INF/persistence.xml, with . See here

    (I usually put it in WEB-INF/classes/META-INF. As noted in the comments, with maven you can place it in src/main/resources/META-INF)

提交回复
热议问题