如何在WildFly中更改默认端口8080 [英] How to change default port 8080 in WildFly

查看:1172
本文介绍了如何在WildFly中更改默认端口8080的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始使用WildFly 8.2开发JAVA EE.我的第一个问题是如何将默认端口8080更改为其他端口?

I just started JAVA EE development with WildFly 8.2. My first problem is how to change the default port 8080 to something else?

我发现许多包含以下行的xml文件.

I found many xml files containing below line.

<socket-binding name="http" port="${jboss.http.port:8080}"/>

但是我想我不必全部更改?!

but I guess I don't have to change all of them?!

推荐答案

在standalone.xml文件中,查找以下元素:

In your standalone.xml file, look for this element:

<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">

port-offset属性使您可以通过添加指定的数字来修改wildfly使用的所有端口.

The port-offset attribute lets you modify all the ports wildfly uses, by adding the number you specify.

例如,默认值是0,这意味着http端口将是8080,远程处理4447,等等.

For example, the default value is 0, which means that http port will be 8080, remoting 4447, etc.

如果您使用${jboss.socket.binding.port-offset:100},则http端口将是8180 (8080+100),远程处理4547 (4447+100),等等.

If you use ${jboss.socket.binding.port-offset:100}, http port will be 8180 (8080+100), remoting 4547 (4447+100), etc.

因此,您无需更改偏移量.

So you need to change the offset, nothing else.

您也可以通过在启动时使用系统属性来执行此操作,请检查

You can also do this by using a system property at startup, check http://www.mastertheboss.com/jboss-server/jboss-configuration/configuring-port-offset-on-jboss-as-wildfly

这篇关于如何在WildFly中更改默认端口8080的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆