jboss7服务器启动后,在本地不能使用ip进行访问项目,只能使用localhost访问,同网段内也不能通过ip访问jboss7中的项目。
找到/standalone/configuration/下standalone.xml文件,修改该配置文件。
<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:0.0.0.0}"/>
</interface>
<!--新增start-->
<interface name="any">
<any-ipv4-address/>
</interface>
<!--新增end-->
</interfaces>
<!--修改default-interface="public" 为 default-interface="any"-->
<socket-binding-group name="standard-sockets" default-interface="any" port-offset="${jboss.socket.binding.port-offset:0}">
通过以上设置,重新启动jboss7服务,在本地能使用ip访问项目,同网段内其他机器也可以通过ip访问本地的项目。
(window7系统、备忘)