如何将一个简单的 Spring Boot 应用程序 JAR 文件部署到 Wildfly 10 服务器

问题描述 投票:0回答:1

我正在尝试寻找将 Spring Boot 应用程序部署到 Wildfly 服务器的解决方案。在某些路径中有一些之前使用 WAR 文件进行的部署:/hello1、/hello2。我的目标是部署在 /hello3 上,所以我创建了 src/main/webapp/WEB-INF/jboss-web.xml,内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<jboss-web xmlns="http://www.jboss.com/xml/ns/javaee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="
      http://www.jboss.com/xml/ns/javaee
      http://www.jboss.org/j2ee/schema/jboss-web_5_1.xsd">
    <context-root>/hello3</context-root>
</jboss-web>

我还创建了一个端点“/”,它在运行 spring boot 后在 localhost:8080 中返回“Hello World”。但是服务器一直返回 404 not found。服务器在 /hello1 和 /hello2 上运行良好。

java spring spring-boot wildfly
1个回答
0
投票

我认为你描述了一个需要明确的问题。

© www.soinside.com 2019 - 2024. All rights reserved.