简体   繁体   English

我可以在自己的.jar文件中包含persistence.xml文件吗?

[英]Can I include persistence.xml file in my own .jar file?

Can we include persistence.xml file in our own user define .jar file in jpa. 我们可以在我们自己的用户中包含persistence.xml文件吗?在jpa中定义.jar文件。 If yes, then please guide me how can we add the persistence.xml file in folder structure? 如果是,那么请指导我如何在文件夹结构中添加persistence.xml文件?

Yes you can, persistence.xml goes in 是的,可以,persistence.xml可以使用

META-INF/persistence.xml

if you are packaging it inside a *.jar, or 如果将其包装在* .jar中,或者

WEB-INF/classes/META-INF/persistence.xml

if you are packaging it inside a *.war 如果您将其包装在* .war中

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM