我使用以下方式成功部署了我的项目:
mvn wildfly:deploy -Dwildfly-hostname = ec2-54-152-40-62.compute-1.amazonaws.com -Dmaven.test.skip = true
我可以在以下位置看到来自wildfly管理部署部分的我的项目aigateway.war:
ec2-54-152-40-62.compute-1.amazonaws.com:9990
我的所有前端代码都位于webapp文件夹中。
但是当我去
ec2-54-152-40-62.compute-1.amazonaws.com:8080/aigateway/index.html
我找不到404。我不知道发生了什么事。在我的本地机器上,一切都很完美。
我正在使用 wildfly 10.1.0.Final,hibernate ogm 5.0.10.Final和Cassandra 3.0.9
这是web.xml:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
<display-name>aigateway</display-name>
<context-param>
<param-name>resteasy.providers</param-name>
<param-value>
com.sensorhound.aigateway.ws.filters.CORSFilter
</param-value>
</context-param>
</web-app>
这是pom.xml:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sensorhound</groupId>
<artifactId>aigateway</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jetty.version>9.3.12.v20160915</jetty.version>
<jersey.version>2.23.2</jersey.version>
<ogm.version>5.0.4.Final</ogm.version>
<hibernate.version>5.0.4.Final</hibernate.version>
<wildfly-hostname>SPECIFY</wildfly-hostname>
<wildfly-user>wildfly-deployer</wildfly-user>
<wildfly-password>Gelert1!</wildfly-password>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-bom</artifactId>
<version>5.0.4.Final</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<!-- hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-orm</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-search-infinispan</artifactId>
<version>5.1.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-cassandra</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
<version>1.6.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging</artifactId>
<version>3.3.0.Final</version>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jandex</artifactId>
<version>2.0.3.Final</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.7.3</version>
</dependency>
<!-- hibernate ogm -->
<!-- Hibernate OGM Infinispan module; pulls in the OGM core module -->
<dependency>
<groupId>org.hibernate.ogm</groupId>
<artifactId>hibernate-ogm-infinispan</artifactId>
<scope>provided</scope>
</dependency>
<!-- standard APIs dependencies - provided in a Java EE container -->
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.jboss.spec.javax.transaction</groupId>
<artifactId>jboss-transaction-api_1.2_spec</artifactId>
</dependency>
<!-- Add the Narayana Transactions Manager
an implementation would be provided in a Java EE container,
but this works nicely in Java SE as well -->
<dependency>
<groupId>org.jboss.narayana.jta</groupId>
<artifactId>narayana-jta</artifactId>
</dependency>
<dependency>
<groupId>org.jboss</groupId>
<artifactId>jboss-transaction-spi</artifactId>
<version>7.5.0.Final</version>
</dependency>
<dependency>
<groupId>jboss</groupId>
<artifactId>jbossjta</artifactId>
<version>4.2.2.GA</version>
</dependency>
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>${jetty.version}</version>
</dependency>
<!-- dependency> <groupId>org.eclipse.jetty</groupId> <artifactId>jetty-servlet</artifactId>
<version>${jetty.version}</version> </dependency -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet-core</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-jetty-http</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.fusesource.leveldbjni</groupId>
<artifactId>leveldbjni-all</artifactId>
<version>1.8</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.ws.rs/javax.ws.rs-api -->
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.googlecode.json-simple</groupId>
<artifactId>json-simple</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.ejb</groupId>
<artifactId>ejb-api</artifactId>
<version>3.0</version>
</dependency>
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>19.0</version>
</dependency>
</dependencies>
<repositories>
<repository>
<id>java.net</id>
<url>https://maven.java.net/content/repositories/public/</url>
</repository>
<repository>
<id>JBoss repository</id>
<url>http://repository.jboss.org/nexus/content/groups/public/</url>
</repository>
<repository>
<id>codehaus</id>
<url>http://repository.codehaus.org/org/codehaus</url>
</repository>
<repository>
<id>sonatype-nexus</id>
<name>Kundera Public Repository</name>
<url>https://oss.sonatype.org/content/repositories/releases</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>kundera-missing</id>
<name>Kundera Public Missing Resources Repository</name>
<url>http://kundera.googlecode.com/svn/maven2/maven-missing-resources</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<build>
<finalName>aigateway</finalName>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<inherited>false</inherited>
<version>1.5.0</version>
<executions>
<execution>
<id>git submodule update</id>
<phase>deploy</phase>
<configuration>
<executable>git</executable>
<arguments>
<argument>submodule</argument>
<argument>update</argument>
<argument>--init</argument>
<argument>--recursive</argument>
</arguments>
</configuration>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.wildfly.plugins</groupId>
<artifactId>wildfly-maven-plugin</artifactId>
<version>1.1.0.Alpha1</version>
<configuration>
<force>true</force>
<hostname>${wildfly-hostname}</hostname>
<username>${wildfly-user}</username>
<password>${wildfly-password}</password>
</configuration>
</plugin>
<plugin>
<artifactId>maven-war-plugin</artifactId>
<version>2.3</version>
<configuration>
<failOnMissingWebXml>false</failOnMissingWebXml>
</configuration>
</plugin>
</plugins>
</build>
</project>
这是来自wildfly的server.log:
2017-03-30 21:34:16,073 DEBUG [org.jboss.as.config] (MSC service thread 1-3) Configured system properties:
[Standalone] =
awt.toolkit = sun.awt.X11.XToolkit
file.encoding = UTF-8
file.encoding.pkg = sun.io
file.separator = /
java.awt.graphicsenv = sun.awt.X11GraphicsEnvironment
java.awt.headless = true
java.awt.printerjob = sun.print.PSPrinterJob
java.class.path = /opt/wildfly/jboss-modules.jar
java.class.version = 52.0
java.endorsed.dirs = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/endorsed
java.ext.dirs = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext:/usr/java/packages/lib/ext
java.home = /usr/lib/jvm/java-8-openjdk-amd64/jre
java.io.tmpdir = /tmp
java.library.path = /usr/java/packages/lib/amd64:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
java.net.preferIPv4Stack = true
java.runtime.name = OpenJDK Runtime Environment
java.runtime.version = 1.8.0_91-8u91-b14-0ubuntu4~14.04-b14
java.specification.name = Java Platform API Specification
java.specification.vendor = Oracle Corporation
java.specification.version = 1.8
java.util.logging.manager = org.jboss.logmanager.LogManager
java.vendor = Oracle Corporation
java.vendor.url = http://java.oracle.com/
java.vendor.url.bug = http://bugreport.sun.com/bugreport/
java.version = 1.8.0_91
java.vm.info = mixed mode
java.vm.name = OpenJDK 64-Bit Server VM
java.vm.specification.name = Java Virtual Machine Specification
java.vm.specification.vendor = Oracle Corporation
java.vm.specification.version = 1.8
java.vm.vendor = Oracle Corporation
java.vm.version = 25.91-b14
javax.management.builder.initial = org.jboss.as.jmx.PluggableMBeanServerBuilder
javax.xml.datatype.DatatypeFactory = __redirected.__DatatypeFactory
javax.xml.parsers.DocumentBuilderFactory = __redirected.__DocumentBuilderFactory
javax.xml.parsers.SAXParserFactory = __redirected.__SAXParserFactory
javax.xml.stream.XMLEventFactory = __redirected.__XMLEventFactory
javax.xml.stream.XMLInputFactory = __redirected.__XMLInputFactory
javax.xml.stream.XMLOutputFactory = __redirected.__XMLOutputFactory
javax.xml.transform.TransformerFactory = __redirected.__TransformerFactory
javax.xml.validation.SchemaFactory:http://www.w3.org/2001/XMLSchema = __redirected.__SchemaFactory
javax.xml.xpath.XPathFactory:http://java.sun.com/jaxp/xpath/dom = __redirected.__XPathFactory
jboss.home.dir = /opt/wildfly
jboss.host.name = ip-172-31-55-197
jboss.modules.dir = /opt/wildfly/modules
jboss.modules.system.pkgs = org.jboss.byteman
jboss.node.name = ip-172-31-55-197
jboss.qualified.host.name = ip-172-31-55-197.ec2.internal
jboss.server.base.dir = /opt/wildfly/standalone
jboss.server.config.dir = /opt/wildfly/standalone/configuration
jboss.server.data.dir = /opt/wildfly/standalone/data
jboss.server.deploy.dir = /opt/wildfly/standalone/data/content
jboss.server.log.dir = /opt/wildfly/standalone/log
jboss.server.name = ip-172-31-55-197
jboss.server.persist.config = true
jboss.server.temp.dir = /opt/wildfly/standalone/tmp
line.separator =
logging.configuration = file:/opt/wildfly/standalone/configuration/logging.properties
module.path = /opt/wildfly/modules
org.jboss.boot.log.file = /opt/wildfly/standalone/log/server.log
org.jboss.resolver.warning = true
org.xml.sax.driver = __redirected.__XMLReaderFactory
os.arch = amd64
os.name = Linux
os.version = 3.13.0-91-generic
path.separator = :
sun.arch.data.model = 64
sun.boot.class.path = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/resources.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/rt.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/sunrsasign.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jsse.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jce.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/charsets.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/jfr.jar:/usr/lib/jvm/java-8-openjdk-amd64/jre/classes
sun.boot.library.path = /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
sun.cpu.endian = little
sun.cpu.isalist =
sun.io.unicode.encoding = UnicodeLittle
sun.java.command = /opt/wildfly/jboss-modules.jar -mp /opt/wildfly/modules org.jboss.as.standalone -Djboss.home.dir=/opt/wildfly -Djboss.server.base.dir=/opt/wildfly/standalone -c standalone.xml
sun.java.launcher = SUN_STANDARD
sun.jnu.encoding = UTF-8
sun.management.compiler = HotSpot 64-Bit Tiered Compilers
sun.os.patch.level = unknown
user.country = US
user.dir = /opt/wildfly-10.1.0.Final
user.home = /home/wildfly
user.language = en
user.name = wildfly
user.timezone = Etc/UTC
2017-03-30 21:34:16,075 DEBUG [org.jboss.as.config] (MSC service thread 1-3) VM Arguments: -D[Standalone] -Xms64m -Xmx1024m -XX:MetaspaceSize=96M -XX:MaxMetaspaceSize=256m -Djava.net.preferIPv4Stack=true -Djboss.modules.system.pkgs=org.jboss.byteman -Djava.awt.headless=true -Dorg.jboss.boot.log.file=/opt/wildfly/standalone/log/server.log -Dlogging.configuration=file:/opt/wildfly/standalone/configuration/logging.properties
2017-03-30 21:34:17,880 WARN [org.jboss.as.txn] (ServerService Thread Pool -- 54) WFLYTX0013: Node identifier property is set to the default value. Please make sure it is unique.
2017-03-30 21:34:18,725 WARN [org.jboss.as.domain.management] (MSC service thread 1-4) WFLYDM0004: The realm name of the defined security realm 'SSLRealm' does not match the realm name within the properties file 'ApplicationRealm'.
2017-03-30 21:34:25,804 WARN [org.hibernate.id.UUIDHexGenerator] (ServerService Thread Pool -- 60) HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values; consider using org.hibernate.id.UUIDGenerator instead
2017-03-30 21:34:25,940 WARN [org.hibernate.boot.internal.SessionFactoryBuilderImpl] (ServerService Thread Pool -- 60) Unrecognized hbm2ddl_auto value : none. Supported values include create, create-drop, update, and validate. Ignoring
2017-03-30 21:34:27,285 WARN [org.hibernate.search.engine.impl.ConfigContext] (ServerService Thread Pool -- 60) HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified: using LUCENE_CURRENT.
2017-03-30 21:34:27,635 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry apache-cassandra-clientutil-3.5.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/cassandra-all-3.5.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:27,635 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry apache-cassandra-thrift-3.5.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/cassandra-all-3.5.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:27,737 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry slf4j-api-1.5.6.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/jacorb-2.3.2.jbossorg-4.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:27,738 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry slf4j-jdk14-1.5.6.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/jacorb-2.3.2.jbossorg-4.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:27,738 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry concurrent-1.3.2.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/jacorb-2.3.2.jbossorg-4.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:27,738 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0059: Class Path entry antlr-2.7.2.jar in /content/sensorcloud-2.2.1-SNAPSHOT.war/WEB-INF/lib/jacorb-2.3.2.jbossorg-4.jar does not point to a valid jar for a Class-Path reference.
2017-03-30 21:34:28,542 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 59) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method init() of class class com.sensorhound.aigateway.db.daos.IOConfigurationDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:34:28,542 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 59) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method end() of class class com.sensorhound.aigateway.db.daos.IOConfigurationDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:34:28,544 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 59) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method init() of class class com.sensorhound.aigateway.db.CassandraDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:34:28,544 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 59) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method end() of class class com.sensorhound.aigateway.db.CassandraDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:34:30,200 WARN [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 59) RESTEASY002155: Provider class com.sensorhound.aigateway.ws.filters.CORSFilter is already registered. 2nd registration is being ignored.
2017-03-30 21:34:31,680 WARN [org.hibernate.mapping.RootClass] (ServerService Thread Pool -- 58) HHH000038: Composite-id class does not override equals(): com.sensorhound.common.domain.impl.GroupRuleStatus
2017-03-30 21:34:31,680 WARN [org.hibernate.mapping.RootClass] (ServerService Thread Pool -- 58) HHH000039: Composite-id class does not override hashCode(): com.sensorhound.common.domain.impl.GroupRuleStatus
2017-03-30 21:35:03,328 WARN [org.hibernate.boot.internal.SessionFactoryBuilderImpl] (ServerService Thread Pool -- 68) Unrecognized hbm2ddl_auto value : none. Supported values include create, create-drop, update, and validate. Ignoring
2017-03-30 21:35:03,352 WARN [org.hibernate.search.engine.impl.ConfigContext] (ServerService Thread Pool -- 68) HSEARCH000075: Configuration setting hibernate.search.lucene_version was not specified: using LUCENE_CURRENT.
2017-03-30 21:35:03,559 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 71) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method init() of class class com.sensorhound.aigateway.db.CassandraDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:35:03,560 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 71) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method end() of class class com.sensorhound.aigateway.db.CassandraDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:35:03,560 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 69) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method init() of class class com.sensorhound.aigateway.db.daos.IOConfigurationDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:35:03,560 WARN [org.jboss.as.ejb3] (ServerService Thread Pool -- 69) WFLYEJB0463: Invalid transaction attribute type REQUIRED on SFSB lifecycle method Method end() of class class com.sensorhound.aigateway.db.daos.IOConfigurationDAO, valid types are REQUIRES_NEW and NOT_SUPPORTED. Method will be treated as NOT_SUPPORTED.
2017-03-30 21:35:03,624 WARN [org.jboss.resteasy.resteasy_jaxrs.i18n] (ServerService Thread Pool -- 74) RESTEASY002155: Provider class com.sensorhound.aigateway.ws.filters.CORSFilter is already registered. 2nd registration is being ignored.
如果您需要更多信息,我愿意分享。
谢谢!
答案 0 :(得分:0)
我刚刚解决了这个问题。问题是我的apache服务器使用端口8080.我的同事将wildfly服务器http端口更改为28080,这根本不起作用。所以,是的,确保做一个 sudo netstat -peanut ,以便在尝试访问该页面之前找出哪个程序正在侦听哪个端口。