我正在使用JBoss EAP 6.4
。我有一个包含资源(需要通过我的应用程序配置文件),并具有以下文件结构的模块文件夹:JBoss:在Module Path中包含子目录
modules
|
|---resources
|
|---main
|
|---templates
| |---template1.xml
| |---template2.xml
|
|---axis2.xml
|---hibernate.cfg.xml
|---module.xml
我module.xml
文件看起来像这样:
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="resources">
<resources>
<resource-root path="."/>
<resource-root path="./templates"/>
</resources>
</module>
我也有一个jboss-deployment-structure.xml
文件:
<?xml version="1.0" encoding="UTF-8"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="resources" />
</dependencies>
</deployment>
</jboss-deployment-structure>
我把模块文件夹放在JBOSS_MODULEPATH
。该应用程序可以找到modules/resources/main
中的XML文件,如axis2.xml
和hibernate.cfg.xml
。但是,它无法找到子目录templates
(如template1.xml
)中的文件。
有什么建议吗?
我尝试一个类似的配置,遇到同样的问题,你正在描述。我的猜测是JBoss类加载器不会遍历这些自定义模块中的子路径。如果它可以工作,我很想知道如何。 –