How to tell eclipse to ignore: “No persistence.xml file found in project”

前端 未结 7 1843
情话喂你
情话喂你 2021-02-05 02:13

For my projects Necessity i regroup all the persistence.xml entries in one core project which i bind as maven dependency wherever i need.

The problem is that the eclipse

7条回答
  •  臣服心动
    2021-02-05 03:12

    All of the other answers to this question deal with the issue by fooling Eclipse into not complaining about the error.

    The correct solution to the issue is to remove the JPA Facet from your project. You can do that by right-clicking the project in Project Explorer, select Properties from the menu. From there, go to "Project Facets", and ensure the JPA entry is unchecked. Click Apply, then OK. Go to the Project menu and select Clean. This will remove the spurious error.

提交回复
热议问题