EclipseLink JPA - location of persistence.xml

前端 未结 2 2163
感动是毒
感动是毒 2021-02-14 11:50

I am using JPA for a java class and having trouble putting the persistence XML file where it should be.

The IDE i am using is Eclipse Helios. Eclipselink jar files are d

2条回答
  •  遇见更好的自我
    2021-02-14 12:37

    JPA persistence XML file location

    Traditionally, the persistence.xml is located in a META-INF folder that needs to reside in the root of the Java classpath. If you’re using Maven, you can store it in the resources folder, like this:

    src/main/resources/META-INF/persistence.xml
    

提交回复
热议问题