[英]Using Hibernate XML Mappings in Play2 Framework
I'm researching into how to use Hibernate XML mapping files in Play, since I don't really see where I would put them (package structure is very different). 我正在研究如何在Play中使用Hibernate XML映射文件,因为我并没有真正知道将它们放在哪里(包结构非常不同)。 I've read about using JPA but all the examples I see use annotations for the mappings. 我已经阅读了有关使用JPA的信息,但是我看到的所有示例都使用了注释进行映射。
In my case I want to map to classes that are in a dependency I have, so the Annotations will not work. 在我的情况下,我想映射到具有依赖项的类,因此注释将不起作用。
Can anyone point to how I could do this in Play2? 谁能指出我如何在Play2中做到这一点?
Thanks! 谢谢!
I think JPA is getting resources from the classpath. 我认为 JPA正在从类路径获取资源。 Try putting your mapping in the conf folder. 尝试将映射放入conf文件夹。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.