有没有办法将persistence.xml 文件的内容放到调用EntityManagerFactory 的源代码中?我尝试构建一个包含 persistence.xml 的项目,但是当我从另一个项目调用它时,我总是收到此错误:
[PersistenceException: No Persistence provider for EntityManager named cassandra_pu]
我还提取了 jar 文件以检查是否包含 xml 文件,它包含在 WEB-INF 文件夹中。对我来说这真的很奇怪,因为persistence.xml已经在jar文件中,为什么它一直要求xml文件?