No persistence units parsed from {classpath*:META-INF/persistence.xml}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [beans.xml]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: No persistence units parsed from {classpath*:META-INF/persistence.xml}
和老師一樣的配置代碼,難道是因?yàn)閖dk版本原因嗎,我是1.8,是不是要用1.7
2018-12-20
因?yàn)槟J(rèn)需要添加一個(gè)persistence.xml文件,在文件中定義實(shí)體類(lèi),并且這個(gè)文件是要在META-INF目錄下的。但是也可以更改一些配置,更改后可以不再使用persistence.xml文件。具體更改看這個(gè)鏈接→ https://www.cnblogs.com/taven/p/3351841.html