最近新項目上線,本人部署過程中總結了以下幾點比較關鍵的地方,看是否對大家有用處
服務器改成支持外網訪問
在standalone.xml文件中找到
<interface name="public">
<inet-address value="${jboss.bind.address:127.0.0.1}"/>
</interface>
在這個下面加入
<interface name="any">
<any-ipv4-address/>
</interface>
另外把1改成2
1 <socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
2 <socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
訪問端口的更改
<socket-binding name="http" port="${jboss.http.port:80}"/>
改為可以修改JSP頁面不用重啟
<servlet-container name="default">
<jsp-config development="true"/>
</servlet-container>
<jsp-config development="true"/>
</servlet-container>
部署的程序不用wildfly內置CXF包
在應用的WEB-INF目錄下面增加該文件:jboss-deployment-structure.xml
<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
<deployment>
<!-- exclude-subsystem prevents a subsystems deployment unit processors running on a deployment -->
<!-- which gives basically the same effect as removing the subsystem, but it only affects single deployment -->
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
<deployment>
<!-- exclude-subsystem prevents a subsystems deployment unit processors running on a deployment -->
<!-- which gives basically the same effect as removing the subsystem, but it only affects single deployment -->
<exclude-subsystems>
<subsystem name="webservices" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>