intellij JBoss standalone.xml 文件更改被覆盖

intelij JBoss standalone.xml file changes are being overridden

我正在使用 Intelij 2018 该项目适用于 wildfly 8.1 final。 我更改了文件中的 header 设置,但是一旦我 运行 项目文件被改回并且所有设置都丢失了。

    <!-- configuration to change -->
    <filters>
        <response-header name="Access-Control-Allow-Origin"
            header-name="Access-Control-Allow-Origin" header-value="*" />
        <response-header name="server-header" header-name="Server"
            header-value="WildFly/8" />
        <response-header name="x-powered-by-header"
            header-name="X-Powered-By" header-value="Undertow/1" />
        <response-header name="Access-Control-Allow-Headers"
            header-name="Access-Control-Allow-Headers"
            header-value="origin, content-type, accept, authorization, application" />
        <response-header name="Access-Control-Allow-Credentials"
            header-name="Access-Control-Allow-Credentials" header-value="true" />
        <response-header name="Access-Control-Allow-Methods"
            header-name="Access-Control-Allow-Methods" header-value="GET, POST, PUT, DELETE, OPTIONS, HEAD" />
        <response-header name="Access-Control-Max-Age"
            header-name="Access-Control-Max-Age" header-value="1209600" />
    </filters>

基本配置是从哪个文件拿来的我再修改

我想我可能已经为您找到了解决方案 - 它可能围绕一个错误。

  1. 通过 intelliJ 停止 Wildfly。
  2. 关闭intelliJ。
  3. 确保 WildFly 没有在浏览器中监听 8080
  4. 在 standlone/configuration 中 - 备份 standalone_xml_history 文件夹,方法是创建它的 zip 文件或创建文件夹副本并向其附加 _bak
  5. 删除文件夹中的所有内容,尤其是当前文件夹和快照文件夹。
  6. 对文件进行更改。
  7. 打开intelliJ。
  8. 开始 JBoss.
  9. 双手合十。
  10. 如果有效 - 盈利!

如果这有效,它是通过此 JBoss 论坛页面 How to write on standalone.xml permanently? 的提示找到的
让我知道它是否有效!