java - Wildfly 8 AS 中的热部署位置

标签 java maven wildfly-8 hotdeploy

在 JBoss 6 AS 中,热部署位置是 ${JBOSS_HOME}/server/default/deploy ,我可以在其中解压 WAR 或 EAR 并更改任何配置文件的内容,并且无需重新启动即可工作。

同样,在Wildfly 8 AS中,谁能帮我了解热部署位置。我尝试在 ${WILDFLY_HOME}/standalone/deployments 文件夹中解压 WAR,但它没有拾取解压的 WAR 文件夹。它仅考虑具有 .war 扩展名的文件。任何人都可以帮助我吗?非常感谢。

另外,如果有关于wildfly-maven-plufgin使用的好的指南,请分享 任何人都可以帮助我吗?非常感谢。

最佳答案

完整的文档可以在这里找到:

https://docs.jboss.org/author/display/WFLY8/Deployment%20Scanner%20configuration.html

要启用分解(解压)存档的自动部署,您需要做的是将独立版本中的 auto-deploy-exploded 设置为 true。 xml配置文件:

<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.0">
    <deployment-scanner 
        scan-interval="5000"
        relative-to="jboss.server.base.dir" 
        path="deployments"
        auto-deploy-exploded="true" />
</subsystem>

这将每 5 秒扫描一次部署目录以查找分解的存档。

如文档中所述,如果没有 auto-deploy-exploded 属性,您需要手动创建 .dodeploy 文件:

Controls whether exploded deployment content should be automatically deployed by the scanner without requiring the user to add a .dodeploy marker file. Setting this to 'true' is not recommended for anything but basic development scenarios, as there is no way to ensure that deployment will not occur in the middle of changes to the content.

关于java - Wildfly 8 AS 中的热部署位置,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29771904/

相关文章:

java - PreferenceFragment 的使用和架构

Java:制作窗口点击(包括文本/图像)

authentication - Picketlink 没有选择我的用户定义的验证器

java - 在 WildFly 8.2.0 Final 版本中添加模块

Java -BlockingQueue——多生产者,单一消费者

java - 更改可见性导致我的应用程序崩溃,为什么?

java - 从远程 maven 存储库下载并执行 jar 文件

java - 仅使用 POJO bean 创建项目

分层多模块项目的 Maven 命名约定

java - Hibernate with jpa 不会在 Wildfly 中自动创建表