Wildfly 24-模块注释不起作用吗?
我在Wildfly 24中部署我的应用程序遇到了一些问题。 我创建了一个包含一些JAR的模块,可以帮助我的部署执行。其中一些罐子的注释如@Entity和@webservice。
根据wildfly文档,我在独立的.xml中创建了一个全局模块,例如:
<global-modules>
<module name="server.defs" annotations="true" />
</global-modules>
我(通过Maven)为模块中的JAR和已部署的JAR创建了Jandex索引。打开罐子时,我可以在meta-inf文件夹上看到jandex.idx。为此,我在pom.xml中使用了以下内容:
<plugin>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
但是当我启动服务器时,它就像没有解析注释一样。 Hibernate找不到@Entity注释的班级,并且使用模块中的@WebService注释的班级未能部署。
如果我不使用模块,则所有内容都正确部署了。 有人对问题有什么想法吗?
谢谢你!
I am having some problems deploying my application in Wildfly 24.
I created a Module containing some jar's that aid my deployments executions. Some of those Jar's have annotations like @Entity and @WebService.
According with the Wildfly documentation, I created a global module in the standalone.xml like:
<global-modules>
<module name="server.defs" annotations="true" />
</global-modules>
Also, I have created (via maven) the jandex index for both the jar in the module and the jar deployed. On opening the jar's I can see the jandex.idx on the META-INF folder. To do this i used in the pom.xml the following:
<plugin>
<groupId>org.jboss.jandex</groupId>
<artifactId>jandex-maven-plugin</artifactId>
<version>1.1.1</version>
<executions>
<execution>
<id>make-index</id>
<goals>
<goal>jandex</goal>
</goals>
</execution>
</executions>
</plugin>
But when i start the server, its like the annotations are not parsed.
Hibernate can't find the class's with the @Entity annotations and the class's using the @WebService annotations in the modules are failing to deploy.
If I don't use the modules, everything is deployed correctly..
Anyone has any idea of whats the problem?
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将项目留在待机中了一段时间,现在我重新启动了它。回答原始问题,是的,您可以在模块目录中注释班级。
只需确保所需的每个依赖项都包含在模块中。您不需要任何'Annotations =“ True”'。
I left the project in standby for a while and now I rebooted it. Answering the original question, yes you can have annotated class's in the modules directories.
Just be sure every single dependency needed is included in the module.xml. You don't need any ' annotations="true" '.