[英]how to load JPA jar with persistence.xml from outside of war file in jboss
我有带有persistence.xml的JPA jar,并且想要在Jboss7中进行部署。
问题是,我无法放入WAR文件(我知道我们可以从war文件中加载)。
我已经在jboss中创建了模块,并将jar文件与包括persistence.xml文件的jar文件一起放入了jar的META-INF \\中,并带有以下代码: http : //javahowto.blogspot.sg/2007/06/where-to-put-persistencexml-in -web-app.html Maven / Eclipse:在类路径中找不到任何META-INF / persistence.xml文件
加载该jar文件后,但未加载persistence.xml。
是否可以从jar文件加载persistence.xml?
如果可能的话,有人可以让我知道,放在罐子里的什么地方
谢谢
如果仅与persistence.xml有关,则可以使用部署覆盖。 参见例如https://docs.jboss.org/author/display/AS72/Deployment+Overlays
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.