在standalone.xml中:
找到下面三行,看到是要访问public(8080端口的)和management的interface,将interface中的127.0.0.1改为0.0.0.0即可。
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
<socket-binding name="management-https" interface="management"port="${jboss.management.https.port:9993}"/>
<socket-binding name="management-https" interface="management"port="${jboss.management.https.port:9993}"/>
修改后为:
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:127.0.0.1}"/>
</interface>
</interfaces>